New answers tagged

0

One way of achieving this behavior is to disable org-indent-mode and set org-adapt-indentation to t. The side effect of this configuration is that spaces will be added to Org file, where org-indent-mode only acts at render time.


0

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 ?\( ...


2

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))


1

Is python-indent-guess-indent-offset set to t? If so, then it's probably looking at your file and deciding to set the python-indent-offset to some other value. Try setting it to nil in the :init for the package. You could also check to see what the value of python-indent-offset is after you've opened the file using C-h v python-indent-offset. Edit: I just ...


0

Okay, so I got in contact with the maintainers/developers of CC-Mode and it turns out that this is bug. They also took care of it: https://sourceforge.net/p/cc-mode/mailman/message/37097087/ In the correspondence you find a patch in text form. To apply the patch, copy the text to a file e.g. patchfile.txt $ mv patchfile.txt path/to/emacs/share/../lisp/...


0

(add-hook 'web-mode-hook (lambda () (setq standard-indent 2))) 99% of all modes define at least one hook variable. Hook variables just hold a list of functions that will be called in the case of some event, usually upon entering some specific mode. Any time you want something to happen when a mode is activated, you want to add it to a hook ...


Top 50 recent answers are included