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)))
(whitespace-cleanup)))
(add-hook 'before-save-hook 'buffer-cleanup-whitespace)
(setq-default show-trailing-whitespace t)
;; Buffer Menu does trailing whitespace, don't show them
(add-hook 'buffer-menu-mode-hook
(lambda () (setq-local show-trailing-whitespace nil)))
(add-hook 'prog-mode-hook
(lambda ()
(setq show-trailing-whitespace t)))
;; ensure repo cache is up1date
(or (file-exists-p package-user-dir)