emacs - Trailing whitespaces only in prog-mode

Apparently many other modes have trailing whitespaces and they are
hilighted in places I don't care.
This commit is contained in:
madmaurice 2017-11-05 22:17:20 +01:00
parent 1ea748bdfc
commit 2766067321

View file

@ -170,10 +170,9 @@
(let ((whitespace-style '(empty trailing))) (let ((whitespace-style '(empty trailing)))
(whitespace-cleanup))) (whitespace-cleanup)))
(add-hook 'before-save-hook 'buffer-cleanup-whitespace) (add-hook 'before-save-hook 'buffer-cleanup-whitespace)
(setq-default show-trailing-whitespace t) (add-hook 'prog-mode-hook
;; Buffer Menu does trailing whitespace, don't show them (lambda ()
(add-hook 'buffer-menu-mode-hook (setq show-trailing-whitespace t)))
(lambda () (setq-local show-trailing-whitespace nil)))
;; ensure repo cache is up1date ;; ensure repo cache is up1date
(or (file-exists-p package-user-dir) (or (file-exists-p package-user-dir)