# HG changeset patch # User Augie Fackler # Date 1267938579 21600 # Node ID 0487f0197755d43d158ef59329ac3ab7d415709f # Parent e77c01b7b0f480fc12ffc28f2b27f508410dc6c1 emacs: disable whitespace-cleanup in makefiles, highlight tabs in makefiles diff --git a/.elisp/settings/40.modes.el b/.elisp/settings/40.modes.el --- a/.elisp/settings/40.modes.el +++ b/.elisp/settings/40.modes.el @@ -17,9 +17,13 @@ point." (add-hook 'c-mode-hook 'af-tab-fix) (add-hook 'sh-mode-hook 'af-tab-fix) (add-hook 'emacs-lisp-mode-hook 'af-tab-fix) -(add-hook 'rst-mode-hook '(lambda () - (make-variable-buffer-local 'af-cleanup-whitespace) - (set-variable 'af-cleanup-whitespace nil))) +(defun af-no-clean-whitespace () + (make-variable-buffer-local 'af-cleanup-whitespace) + (set-variable 'af-cleanup-whitespace nil)) +(add-hook 'rst-mode-hook 'af-no-clean-whitespace) +(add-hook 'makefile-mode-hook '(lambda () + (af-no-clean-whitespace) + (add-hook 'font-lock-mode-hook 'show-ws-highlight-tabs))) (autoload 'js2-mode "js2" nil t) (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))