From 269ad348ac54e54ebed4dda59dc5bce78f86423b Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 11 Nov 2014 11:14:42 +0100 Subject: [PATCH] Set some more web-mode settings --- emacs/.emacs.d/init.org | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 040208f..dbe9e8f 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -73,9 +73,9 @@ specific value. #+BEGIN_SRC emacs-lisp - (defmacro change-setting (name value) + (defmacro change-settings (&rest settings) "Create a function that changes the value of NAME to VALUE." - `(lambda () (setq ,name ,value))) + `(lambda () (setq ,@settings))) #+END_SRC ** Whitespace only with tabs @@ -1206,7 +1206,13 @@ Set =indent-tabs-mode= for ~web-mode~ as well. #+BEGIN_SRC emacs-lisp - (add-hook 'web-mode-hook (change-setting indent-tabs-mode t)) + (defvar web-mode-code-indent-offset) + (defvar web-mode-markup-indent-offset) + + (add-hook 'web-mode-hook + (change-settings indent-tabs-mode t + web-mode-code-indent-offset 4 + web-mode-markup-indent-offset 4)) #+END_SRC * Load custom file