summary refs log tree commit diff stats
path: root/tag-emacs
diff options
context:
space:
mode:
authorAlan Pearce2015-07-26 16:41:27 +0200
committerAlan Pearce2015-07-26 16:41:27 +0200
commitb0784e8a8bf42215897696762f39905b5a392ef0 (patch)
tree5574a489673ea963218857c6c3d36c13226e2f56 /tag-emacs
parent3156b8216c426f55fded3c993b80bcf348a197ba (diff)
downloaddotfiles-b0784e8a8bf42215897696762f39905b5a392ef0.tar.lz
dotfiles-b0784e8a8bf42215897696762f39905b5a392ef0.tar.zst
dotfiles-b0784e8a8bf42215897696762f39905b5a392ef0.zip
Emacs: Autoload smart-tabs mode better
Diffstat (limited to 'tag-emacs')
-rw-r--r--tag-emacs/emacs.d/init.org15
1 files changed, 9 insertions, 6 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org
index 1ee23b9..14fda85 100644
--- a/tag-emacs/emacs.d/init.org
+++ b/tag-emacs/emacs.d/init.org
@@ -596,14 +596,17 @@ Not related to [[smart-tab][=smart-tab=]], this mode indents with tabs and align
 with spaces.  Perfect!
 
 #+BEGIN_SRC emacs-lisp
-(req-package smart-tabs-mode
-  :commands (smart-tabs-mode
-             smart-tabs-mode-enable
-             smart-tabs-advice)
-  :config (progn
+  (req-package smart-tabs-mode
+    :commands (smart-tabs-mode
+               smart-tabs-mode-enable
+               smart-tabs-advice)
+    :config (progn
+              (smart-tabs-insinuate 'c 'javascript 'cperl 'python))
+    :init (progn
             (add-hook 'php-mode-hook (lambda ()
                                        (smart-tabs-mode indent-tabs-mode)))
-            (smart-tabs-insinuate 'c 'javascript 'cperl 'python)))
+            (add-hook 'js2-mode-hook (lambda ()
+                                       (smart-tabs-mode indent-tabs-mode)))))
 #+END_SRC
 
 * Security