summary refs log tree commit diff stats
path: root/emacs
diff options
context:
space:
mode:
authorAlan Pearce2017-05-12 14:47:56 +0200
committerAlan Pearce2017-05-12 14:47:56 +0200
commit26ab88d706e7de3a10310ab0b50cea62b8b0f23a (patch)
tree218da2c3c5bdd113f3364245a292a11b79df0384 /emacs
parentd072b85a000e9f81ff6685fb39422825ceb218c8 (diff)
downloadnixfiles-26ab88d706e7de3a10310ab0b50cea62b8b0f23a.tar.lz
nixfiles-26ab88d706e7de3a10310ab0b50cea62b8b0f23a.tar.zst
nixfiles-26ab88d706e7de3a10310ab0b50cea62b8b0f23a.zip
Emacs: Fix initialisation of tern-mode
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/init.org6
1 files changed, 4 insertions, 2 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index d9a9ab04..d55445bd 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -2080,8 +2080,10 @@ completions, besides other IDE-like things.
   :defer 5
   :config (progn
             (setq tern-command (list (executable-find "tern")))
-            (add-hook 'js2-mode-hook #'tern-mode-enable)
-            (add-hook 'web-mode-hook #'tern-mode-enable)))
+            (create-hook-helper tern-mode-on ()
+              :hooks (web-mode-hook
+                      js2-mode-hook)
+              (tern-mode +1))))
 
 (with-eval-after-load 'tern
   (use-package company-tern))