diff options
| author | Juanma Barranquero | 2008-02-02 17:41:55 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2008-02-02 17:41:55 +0000 |
| commit | e5403637d73e15c3d4855498bcedb697e7c4f5e3 (patch) | |
| tree | 8043a7cfac03f97b4638148d499d6d072a58fca1 /lisp | |
| parent | a8fd9158b7b26e882c5d0b3a3348ffe5154843b2 (diff) | |
| download | emacs-e5403637d73e15c3d4855498bcedb697e7c4f5e3.tar.gz emacs-e5403637d73e15c3d4855498bcedb697e7c4f5e3.zip | |
(global-whitespace-mode): Revert last change.
(whitespace-unload-function): Force `global-whitespace-mode'
to deactivate local modes in a slightly less intrusive way.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/whitespace.el | 7 |
1 files 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." | |||
| 928 | (remove-hook 'find-file-hook 'whitespace-turn-on-if-enabled) | 928 | (remove-hook 'find-file-hook 'whitespace-turn-on-if-enabled) |
| 929 | (dolist (buffer (buffer-list)) ; adjust all local mode | 929 | (dolist (buffer (buffer-list)) ; adjust all local mode |
| 930 | (set-buffer buffer) | 930 | (set-buffer buffer) |
| 931 | (when (or (not whitespace-mode) | 931 | (unless whitespace-mode |
| 932 | ;; whitespace is being unloaded | ||
| 933 | (bound-and-true-p unload-function-defs-list)) | ||
| 934 | (whitespace-turn-off))))))) | 932 | (whitespace-turn-off))))))) |
| 935 | 933 | ||
| 936 | 934 | ||
| @@ -1758,7 +1756,8 @@ options are valid." | |||
| 1758 | 1756 | ||
| 1759 | (defun whitespace-unload-function () | 1757 | (defun whitespace-unload-function () |
| 1760 | "Unload the Whitespace library." | 1758 | "Unload the Whitespace library." |
| 1761 | (global-whitespace-mode -1) | 1759 | (let (whitespace-mode) ;; so g-w-m thinks it is nil in all buffers |
| 1760 | (global-whitespace-mode -1)) | ||
| 1762 | ;; continue standard unloading | 1761 | ;; continue standard unloading |
| 1763 | nil) | 1762 | nil) |
| 1764 | 1763 | ||