summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--emacs/.emacs.d/init.org12
1 files 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