diff --git a/emacs/.emacs.d/init/oni-js2-init.el b/emacs/.emacs.d/init/oni-js2-init.el index 5eae8e3..4c81f4e 100644 --- a/emacs/.emacs.d/init/oni-js2-init.el +++ b/emacs/.emacs.d/init/oni-js2-init.el @@ -26,11 +26,6 @@ (require 'js2-mode) -(defun oni-js2-init--js2-whitespace-mode () - "Enable whitespace mode with only tabs showing." - (setq-local whitespace-style '(face tabs)) - (whitespace-mode)) - (setq js2-strict-trailing-comma-warning nil) (setq js2-basic-offset 2) @@ -42,7 +37,7 @@ (add-hook 'js2-mode-hook 'tern-mode) (add-hook 'js2-mode-hook 'js2-refactor-mode) (add-hook 'js2-mode-hook 'fic-mode) -(add-hook 'js2-mode-hook 'oni-js2-init--js2-whitespace-mode) +(add-hook 'js2-mode-hook 'whitespace-only-tabs-mode) (provide 'oni-js2-init) ;;; oni-js2-init.el ends here diff --git a/emacs/.emacs.d/site-lisp/whitespace-only-tabs-mode.el b/emacs/.emacs.d/site-lisp/whitespace-only-tabs-mode.el index f64e52f..3052eac 100755 --- a/emacs/.emacs.d/site-lisp/whitespace-only-tabs-mode.el +++ b/emacs/.emacs.d/site-lisp/whitespace-only-tabs-mode.el @@ -24,6 +24,8 @@ ;;; Code: +(require 'whitespace) + ;;;###autoload (defun init-whitespace-only-tabs-mode () "Enable whitespace mode with only tabs showing."