From fa0db45f32a6cc6fad0d80c605e4efab873859fc Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 17 Nov 2014 15:37:27 +0900 Subject: [PATCH] emacs.el: Set js-mode indent level to 2 --- emacs.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/emacs.el b/emacs.el index 71f61a6..2075521 100644 --- a/emacs.el +++ b/emacs.el @@ -1108,6 +1108,7 @@ found, otherwise returns nil." "https://raw.github.com/mooz/js2-mode/master/js2-mode.el" t) (lazy-load-eval 'js2-mode) + ;; currently do not use js2-mode ;; (add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode)) ;; (add-to-list 'auto-mode-alist '("\\.jsm\\'" . js2-mode)) (add-hook 'js2-mode-hook @@ -1124,11 +1125,12 @@ found, otherwise returns nil." ;; t) ))) +(eval-after-load "js" + (setq js-indent-level 2)) + (add-to-list 'interpreter-mode-alist '("node" . js-mode)) -(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation) - (when (lazy-load-eval 'flymake-jslint '(flymake-jslint-load)) (lazy-load-eval 'js nil @@ -1137,6 +1139,8 @@ found, otherwise returns nil." (require 'js-doc nil t) +(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation) + (when (require 'uniquify nil t) (setq uniquify-buffer-name-style 'post-forward-angle-brackets) (setq uniquify-ignore-buffers-re "*[^*]+*")