emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r103529: Make save-some-buffers messa


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r103529: Make save-some-buffers message more informative (Bug#8134).
Date: Sat, 05 Mar 2011 14:37:46 -0500
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 103529
author: David Engster <address@hidden>
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sat 2011-03-05 14:37:46 -0500
message:
  Make save-some-buffers message more informative (Bug#8134).
  
  * files.el (save-some-buffers): Report the names of buffers saved
  automatically due to buffer-save-without-query.
modified:
  lisp/ChangeLog
  lisp/files.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-03-05 15:40:50 +0000
+++ b/lisp/ChangeLog    2011-03-05 19:37:46 +0000
@@ -1,3 +1,8 @@
+2011-03-05  David Engster  <address@hidden>
+
+       * 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  <address@hidden>
 
        * net/rcirc.el: Add QuakeNet authentication support.

=== modified file 'lisp/files.el'
--- a/lisp/files.el     2011-03-05 08:48:52 +0000
+++ b/lisp/files.el     2011-03-05 19:37:46 +0000
@@ -4609,14 +4609,14 @@
 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 @@
             (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 ", "))))))))
 
 (defun not-modified (&optional arg)
   "Mark current buffer as unmodified, not needing to be saved.


reply via email to

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