comparison .elisp/settings/40.modes.el @ 189:0487f0197755

emacs: disable whitespace-cleanup in makefiles, highlight tabs in makefiles
author Augie Fackler <durin42@gmail.com>
date Sat, 06 Mar 2010 23:09:39 -0600
parents 7fa84e297c84
children ccab2fe3a256
comparison
equal deleted inserted replaced
188:e77c01b7b0f4 189:0487f0197755
15 ;; add hooks for modes you want to use the tab completion for: 15 ;; add hooks for modes you want to use the tab completion for:
16 (set-variable 'af-cleanup-whitespace t) 16 (set-variable 'af-cleanup-whitespace t)
17 (add-hook 'c-mode-hook 'af-tab-fix) 17 (add-hook 'c-mode-hook 'af-tab-fix)
18 (add-hook 'sh-mode-hook 'af-tab-fix) 18 (add-hook 'sh-mode-hook 'af-tab-fix)
19 (add-hook 'emacs-lisp-mode-hook 'af-tab-fix) 19 (add-hook 'emacs-lisp-mode-hook 'af-tab-fix)
20 (add-hook 'rst-mode-hook '(lambda () 20 (defun af-no-clean-whitespace ()
21 (make-variable-buffer-local 'af-cleanup-whitespace) 21 (make-variable-buffer-local 'af-cleanup-whitespace)
22 (set-variable 'af-cleanup-whitespace nil))) 22 (set-variable 'af-cleanup-whitespace nil))
23 (add-hook 'rst-mode-hook 'af-no-clean-whitespace)
24 (add-hook 'makefile-mode-hook '(lambda ()
25 (af-no-clean-whitespace)
26 (add-hook 'font-lock-mode-hook 'show-ws-highlight-tabs)))
23 27
24 (autoload 'js2-mode "js2" nil t) 28 (autoload 'js2-mode "js2" nil t)
25 (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode)) 29 (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
26 (add-hook 'js2-mode-hook 'af-tab-fix) 30 (add-hook 'js2-mode-hook 'af-tab-fix)
27 31