]> git.eshelyaron.com Git - emacs.git/commitdiff
(global-whitespace-mode): Revert last change.
authorJuanma Barranquero <lekktu@gmail.com>
Sat, 2 Feb 2008 17:41:55 +0000 (17:41 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Sat, 2 Feb 2008 17:41:55 +0000 (17:41 +0000)
(whitespace-unload-function): Force `global-whitespace-mode'
to deactivate local modes in a slightly less intrusive way.

lisp/whitespace.el

index 9f11172ad63b9f80b16e46cf34cc0a113c191d66..5c65e24d40577aaf071835987583762680f428fb 100644 (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)