Emacs: Fix initialisation of tern-mode
Alan Pearce alan@alanpearce.eu
Fri, 12 May 2017 14:47:56 +0200
1 files changed, 4 insertions(+), 2 deletions(-)
jump to
M emacs/.emacs.d/init.org → emacs/.emacs.d/init.org
@@ -2080,8 +2080,10 @@ :if (executable-find "tern") :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))