# HG changeset patch # User Juanma Barranquero # Date 1201974115 0 # Node ID 13eacee3408ee9b6b83f5b2e73143949225cd1b5 # Parent 9a247ca132c4eb7ebf69dd14d8f54b35646ebedd (global-whitespace-mode): Revert last change. (whitespace-unload-function): Force `global-whitespace-mode' to deactivate local modes in a slightly less intrusive way. diff -r 9a247ca132c4 -r 13eacee3408e lisp/whitespace.el --- a/lisp/whitespace.el Sat Feb 02 17:35:23 2008 +0000 +++ b/lisp/whitespace.el Sat Feb 02 17:41:55 2008 +0000 @@ -928,9 +928,7 @@ (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 @@ (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)