1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

(global-whitespace-mode): Revert last change.

(whitespace-unload-function): Force `global-whitespace-mode'
to deactivate local modes in a slightly less intrusive way.
This commit is contained in:
Juanma Barranquero 2008-02-02 17:41:55 +00:00
parent a8fd9158b7
commit e5403637d7

View file

@ -928,9 +928,7 @@ Only useful with a windowing system."
(remove-hook 'find-file-hook 'whitespace-turn-on-if-enabled)
(dolist (buffer (buffer-list)) ; adjust all local mode
(set-buffer buffer)
(when (or (not whitespace-mode)
;; whitespace is being unloaded
(bound-and-true-p unload-function-defs-list))
(unless whitespace-mode
(whitespace-turn-off)))))))
@ -1758,7 +1756,8 @@ options are valid."
(defun whitespace-unload-function ()
"Unload the Whitespace library."
(global-whitespace-mode -1)
(let (whitespace-mode) ;; so g-w-m thinks it is nil in all buffers
(global-whitespace-mode -1))
;; continue standard unloading
nil)