Set some more web-mode settings

This commit is contained in:
Tom Willemse 2014-11-11 11:14:42 +01:00
parent 8e4cf56280
commit 269ad348ac

View file

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