Merge pull request #2915 from Keating950/develop

Respect global whitespace mode config if set
This commit is contained in:
Henrik Lissner
2020-04-17 21:49:07 -04:00
committed by GitHub

View File

@ -138,10 +138,11 @@ size.")
e.g. If you indent with spaces by default, tabs will be highlighted. If you e.g. If you indent with spaces by default, tabs will be highlighted. If you
indent with tabs, spaces at BOL are highlighted. indent with tabs, spaces at BOL are highlighted.
Does nothing if `whitespace-mode' is already active or the current buffer is Does nothing if `whitespace-mode' or 'global-whitespace-mode' is already
read-only or not file-visiting." active or if the current buffer is read-only or not file-visiting."
(unless (or (eq major-mode 'fundamental-mode) (unless (or (eq major-mode 'fundamental-mode)
buffer-read-only buffer-read-only
global-whitespace-mode
(null buffer-file-name)) (null buffer-file-name))
(require 'whitespace) (require 'whitespace)
(set (make-local-variable 'whitespace-style) (set (make-local-variable 'whitespace-style)