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:
parent
1ea748bdfc
commit
2766067321
1 changed files with 3 additions and 4 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue