From cee851f55bb95132aa7e763f3d56c0b350dbd3c2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 18 Feb 2019 15:39:08 -0500 Subject: [PATCH] Only activate whitespace-mode in editable buffers Otherwise whitespace-mode will disrupt fontification in special buffers, like helm and elfeed buffers. Indirectly addresses #1179 --- core/core-ui.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/core-ui.el b/core/core-ui.el index 9a2b0ee58..5af0bdffd 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -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)