]> git.eshelyaron.com Git - emacs.git/commitdiff
Make save-some-buffers message more informative (Bug#8134).
authorDavid Engster <deng@randomsample.de>
Sat, 5 Mar 2011 19:37:46 +0000 (14:37 -0500)
committerChong Yidong <cyd@stupidchicken.com>
Sat, 5 Mar 2011 19:37:46 +0000 (14:37 -0500)
* files.el (save-some-buffers): Report the names of buffers saved
automatically due to buffer-save-without-query.

lisp/ChangeLog
lisp/files.el

index fb0e2f923c4e89154585d4ebb0279161eb403d3d..e0cdeae84af2afb8fde6b1d58792fcae8e7a9729 100644 (file)
@@ -1,3 +1,8 @@
+2011-03-05  David Engster  <deng@randomsample.de>
+
+       * files.el (save-some-buffers): Report the names of buffers saved
+       automatically due to buffer-save-without-query (Bug#8134).
+
 2011-03-05  Deniz Dogan  <deniz.a.m.dogan@gmail.com>
 
        * net/rcirc.el: Add QuakeNet authentication support.
index 52ccbbf86dda7980958a94ff265ccbd6483d0e1b..a236b337b3530eaa10ff132a774b489c72f14715 100644 (file)
@@ -4609,14 +4609,14 @@ See `save-some-buffers-action-alist' if you want to
 change the additional actions you can take on files."
   (interactive "P")
   (save-window-excursion
-    (let* (queried some-automatic
+    (let* (queried autosaved-buffers
           files-done abbrevs-done)
       (dolist (buffer (buffer-list))
        ;; First save any buffers that we're supposed to save unconditionally.
        ;; That way the following code won't ask about them.
        (with-current-buffer buffer
          (when (and buffer-save-without-query (buffer-modified-p))
-           (setq some-automatic t)
+           (push (buffer-name) autosaved-buffers)
            (save-buffer))))
       ;; Ask about those buffers that merit it,
       ;; and record the number thus saved.
@@ -4662,9 +4662,15 @@ change the additional actions you can take on files."
             (setq abbrevs-changed nil)
             (setq abbrevs-done t)))
       (or queried (> files-done 0) abbrevs-done
-         (message (if some-automatic
-                      "(Some special files were saved without asking)"
-                    "(No files need saving)"))))))
+         (cond
+          ((null autosaved-buffers)
+           (message "(No files need saving)"))
+          ((= (length autosaved-buffers) 1)
+           (message "(Saved %s)" (car autosaved-buffers)))
+          (t
+           (message "(Saved %d files: %s)"
+                    (length autosaved-buffers)
+                    (mapconcat 'identity autosaved-buffers ", "))))))))
 \f
 (defun not-modified (&optional arg)
   "Mark current buffer as unmodified, not needing to be saved.