[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 15:56:24 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Branch: EMACS_22_BASE
Changes by: Juanma Barranquero <lektu> 07/10/31 15:56:24
Index: whitespace.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/whitespace.el,v
retrieving revision 1.52.2.2
retrieving revision 1.52.2.3
diff -u -b -r1.52.2.2 -r1.52.2.3
--- whitespace.el 8 Aug 2007 07:38:43 -0000 1.52.2.2
+++ whitespace.el 31 Oct 2007 15:56:23 -0000 1.52.2.3
@@ -782,7 +782,6 @@
(defun whitespace-write-file-hook ()
"Hook function to be called on the buffer when whitespace check is enabled.
This is meant to be added buffer-locally to `write-file-functions'."
- (interactive)
(let ((werr nil))
(if whitespace-auto-cleanup
(whitespace-cleanup-internal)
@@ -792,6 +791,18 @@
buffer-file-name))))
nil)
+(defun whitespace-unload-function ()
+ "Unload the whitespace library."
+ (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)
+
(defun whitespace-unload-hook ()
(remove-hook 'find-file-hook 'whitespace-buffer)
(remove-hook 'write-file-functions 'whitespace-write-file-hook t)
- [Emacs-diffs] Changes to emacs/lisp/whitespace.el, v [EMACS_22_BASE],
Juanma Barranquero <=