New answers tagged


electric-indent-mode is enabled by default. You can turn it off via (electric-indent-mode -1) in your ~/.emacs, but if you want to only disable it for a particular char (e.g. () in a particular major mode, the normal way could look like: (add-hook '<foo>-mode-hook (lambda () (setq electric-indent-chars (delq ?\( ...


C-hk( tells us: ( runs the command c-electric-paren (found in c-mode-map), which is an interactive compiled Lisp function in ‘cc-cmds.el’. It is bound to ), (. I suggest: (with-eval-after-load "cc-mode" (define-key c-mode-map (kbd "(") #'self-insert-command) (define-key c-mode-map (kbd ")") #'self-insert-command))

Top 50 recent answers are included