Emacs: replace js3-mode with js2-mode
Alan Pearce alan@alanpearce.co.uk
Thu, 30 May 2013 15:07:41 +0100
1 files changed, 6 insertions(+), 6 deletions(-)
jump to
M emacs/init.el → emacs/init.el
@@ -1010,18 +1010,18 @@ (interactive) (comint-send-string (inferior-moz-process) "BrowserReload();")))) -(use-package js3 - :mode ("\\.js\\'" . js3-mode) +(use-package js2 + :ensure t + :mode ("\\.js\\'" . js2-mode) :config (progn (defun ap/javascript-setup () (if (featurep 'moz) (moz-minor-mode t)) (autopair-mode -1) (auto-indent-mode -1)) - (add-hook 'js3-mode-hook #'ap/javascript-setup) - (setq js3-indent-level 4 - js3-indent-tabs-mode t - js3-global-externs '("$")))) + (add-hook 'js2-mode-hook #'ap/javascript-setup) + (setq js2-basic-offset 4 + js2-global-externs '("$")))) (use-package mustache-mode :ensure t