[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/whitespace.el, v [EMACS_22_BASE]
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/whitespace.el, v [EMACS_22_BASE] |
Date: |
Wed, 31 Oct 2007 18:41:38 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Branch: EMACS_22_BASE
Changes by: Juanma Barranquero <lektu> 07/10/31 18:41:38
Index: whitespace.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/whitespace.el,v
retrieving revision 1.52.2.3
retrieving revision 1.52.2.4
diff -u -b -r1.52.2.3 -r1.52.2.4
--- whitespace.el 31 Oct 2007 15:56:23 -0000 1.52.2.3
+++ whitespace.el 31 Oct 2007 18:41:37 -0000 1.52.2.4
@@ -793,15 +793,18 @@
(defun whitespace-unload-function ()
"Unload the whitespace library."
+ (if (unintern "whitespace-unload-hook")
+ ;; if whitespace-unload-hook is defined, let's get rid of it
+ ;; and recursively call `unload-feature'
+ (progn (unload-feature 'whitespace) t)
+ ;; this only happens in the recursive call
(whitespace-global-mode -1)
(save-current-buffer
(dolist (buf (buffer-list))
(set-buffer buf)
(remove-hook 'write-file-functions 'whitespace-write-file-hook t)))
- ;; new-style unloading, stop old style from running
- (with-no-warnings (setq whitespace-unload-hook nil))
;; continue standard unloading
- nil)
+ nil))
(defun whitespace-unload-hook ()
(remove-hook 'find-file-hook 'whitespace-buffer)