commit 74f77ff43de07fc323a5911a2615d22b895ad4a6 parent d31bb2c49aafe1cba12a7a3d06267ba5071d4233 Author: Alex Balgavy <alex@balgavy.eu> Date: Tue, 27 Jul 2021 15:43:37 +0200 emacs: indentation for sh Diffstat:
M | emacs/config.org | | | 12 | +++++++++--- |
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/emacs/config.org b/emacs/config.org @@ -412,6 +412,12 @@ Never insert tabs with indentation: (setq-default indent-tabs-mode nil) #+end_src +Indentation for various modes: + +#+begin_src emacs-lisp + (setq sh-basic-offset 2) +#+end_src + ** Wrapping I want to wrap text at window boundary for some modes: @@ -515,9 +521,9 @@ SemanticDB is written into ~/.emacs.d/semanticdb/. Enable semantic mode for major modes: #+begin_src emacs-lisp - (let ((mode-hooks '(c-mode-common-hook))) - (mapc (lambda (mode-name) - (add-hook mode-name (lambda () (semantic-mode 1)))) + (let ((mode-hooks [c-mode-common-hook])) + (mapc (lambda (mode-name) + (add-hook mode-name (lambda () (semantic-mode 1)))) mode-hooks)) #+end_src