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)