Named function hooked to diff-mode-hook

This commit is contained in:
syl20bnr 2015-05-07 00:49:32 -04:00
parent fb743fc5e7
commit 53271caa5b

View file

@ -2715,19 +2715,20 @@ It is a string holding:
:off (global-whitespace-mode -1)
:documentation "Globally display the whitespaces."
: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))))
(defun spacemacs//set-whitespace-style-for-diff ()
"Whitespace configuration for `diff-mode'"
(setq-local whitespace-style '(face
tabs
tab-mark
spaces
space-mark
trailing
indentation::space
indentation::tab
newline
newline-mark)))
(add-hook 'diff-mode-hook 'whitespace-mode)
(add-hook 'diff-mode-hook 'spacemacs//set-whitespace-style-for-diff))
:config
(progn
(set-face-attribute 'whitespace-space nil