all repos — nixfiles @ adcfe2752fa9a229953256c32c68f67d28f0aaf2

System and user configuration, managed by nix and home-manager

Emacs: replace js3-mode with js2-mode
Alan Pearce alan@alanpearce.co.uk
Thu, 30 May 2013 15:07:41 +0100
commit

adcfe2752fa9a229953256c32c68f67d28f0aaf2

parent

f40ae73f2968e4b5343741839fe5af7b10f903a0

1 files changed, 6 insertions(+), 6 deletions(-)

jump to
M emacs/init.elemacs/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