[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/whitespace.el,v
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/whitespace.el,v |
Date: |
Fri, 09 Nov 2007 09:45:32 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Miles Bader <miles> 07/11/09 09:45:31
Index: lisp/whitespace.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/whitespace.el,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -b -r1.55 -r1.56
--- lisp/whitespace.el 24 Sep 2007 15:15:49 -0000 1.55
+++ lisp/whitespace.el 9 Nov 2007 09:45:19 -0000 1.56
@@ -784,7 +784,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)
@@ -794,6 +793,21 @@
buffer-file-name))))
nil)
+(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)))
+ ;; 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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/whitespace.el,v,
Miles Bader <=