From e5403637d73e15c3d4855498bcedb697e7c4f5e3 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Sat, 2 Feb 2008 17:41:55 +0000 Subject: [PATCH] (global-whitespace-mode): Revert last change. (whitespace-unload-function): Force `global-whitespace-mode' to deactivate local modes in a slightly less intrusive way. --- lisp/whitespace.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lisp/whitespace.el b/lisp/whitespace.el index 9f11172ad63..5c65e24d405 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el @@ -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) -- 2.39.2