Only activate whitespace-mode in editable buffers

Otherwise whitespace-mode will disrupt fontification in special buffers,
like helm and elfeed buffers.

Indirectly addresses #1179
This commit is contained in:
Henrik Lissner 2019-02-18 15:39:08 -05:00
parent ed0a4bc5ca
commit cee851f55b
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395

View File

@ -469,7 +469,9 @@ derived from `special-mode'."
(unless (or (bound-and-true-p global-whitespace-mode)
(bound-and-true-p whitespace-mode)
(eq major-mode 'fundamental-mode)
(derived-mode-p 'special-mode))
(eq (get major-mode 'mode-class) 'special)
(derived-mode-p 'special-mode)
buffer-read-only)
(require 'whitespace)
(set (make-local-variable 'whitespace-style)
(if (bound-and-true-p whitespace-newline-mode)