emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/whitespace.el,v


From: Eli Zaretskii
Subject: [Emacs-diffs] Changes to emacs/lisp/whitespace.el,v
Date: Fri, 18 Aug 2006 12:50:09 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Eli Zaretskii <eliz>    06/08/18 12:50:08

Index: whitespace.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/whitespace.el,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- whitespace.el       25 May 2006 18:09:25 -0000      1.44
+++ whitespace.el       18 Aug 2006 12:50:08 -0000      1.45
@@ -524,7 +524,7 @@
       (whitespace-cleanup-region (region-beginning) (region-end))
     (whitespace-cleanup-internal)))
 
-(defun whitespace-cleanup-internal ()
+(defun whitespace-cleanup-internal (&optional region-only)
   ;; If this buffer really contains a file, then run, else quit.
   (whitespace-check-whitespace-mode current-prefix-arg)
   (if (and buffer-file-name whitespace-mode)
@@ -569,9 +569,12 @@
        ;; Call this recursively till everything is taken care of
        (if whitespace-any
            (whitespace-cleanup-internal)
+         ;; if we are done, talk to the user
          (progn
-           (if (not whitespace-silent)
-               (message "%s clean" buffer-file-name))
+           (unless whitespace-silent
+             (if region-only
+                 (message "The region is now clean")
+               (message "%s is now clean" buffer-file-name)))
            (whitespace-update-modeline)))
        (setq tab-width whitespace-tabwith-saved))))
 
@@ -582,7 +585,7 @@
   (save-excursion
     (save-restriction
       (narrow-to-region s e)
-      (whitespace-cleanup-internal))
+      (whitespace-cleanup-internal t))
     (whitespace-buffer t)))
 
 (defun whitespace-buffer-leading ()




reply via email to

[Prev in Thread] Current Thread [Next in Thread]