Enable whitespace-mode for diff-mode

Since diff-mode is where we review our patch, it would be nice to review
whitespace as well, so we don't add unneeded characters.
This commit is contained in:
Tu Do 2015-04-22 18:53:06 +07:00 committed by syl20bnr
parent 8e338adf74
commit fb743fc5e7

View file

@ -2714,7 +2714,20 @@ It is a string holding:
:on (global-whitespace-mode)
:off (global-whitespace-mode -1)
:documentation "Globally display the whitespaces."
:evil-leader "t C-w"))
:evil-leader "t C-w")
(add-hook 'diff-mode-hook (lambda ()
(setq-local whitespace-style
'(face
tabs
tab-mark
spaces
space-mark
trailing
indentation::space
indentation::tab
newline
newline-mark))
(whitespace-mode 1))))
:config
(progn
(set-face-attribute 'whitespace-space nil