aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Engster2011-03-05 14:37:46 -0500
committerChong Yidong2011-03-05 14:37:46 -0500
commitc5f09daf79627a37d3eba0ec8c4cc0841007624d (patch)
treea9bd28d5817eebf9784568ce4074aa71d4337273
parent903538d450d69afc9799563f0df0328e67921518 (diff)
downloademacs-c5f09daf79627a37d3eba0ec8c4cc0841007624d.tar.gz
emacs-c5f09daf79627a37d3eba0ec8c4cc0841007624d.zip
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.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/files.el16
2 files changed, 16 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index fb0e2f923c4..e0cdeae84af 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12011-03-05 David Engster <deng@randomsample.de>
2
3 * files.el (save-some-buffers): Report the names of buffers saved
4 automatically due to buffer-save-without-query (Bug#8134).
5
12011-03-05 Deniz Dogan <deniz.a.m.dogan@gmail.com> 62011-03-05 Deniz Dogan <deniz.a.m.dogan@gmail.com>
2 7
3 * net/rcirc.el: Add QuakeNet authentication support. 8 * net/rcirc.el: Add QuakeNet authentication support.
diff --git a/lisp/files.el b/lisp/files.el
index 52ccbbf86dd..a236b337b35 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4609,14 +4609,14 @@ See `save-some-buffers-action-alist' if you want to
4609change the additional actions you can take on files." 4609change the additional actions you can take on files."
4610 (interactive "P") 4610 (interactive "P")
4611 (save-window-excursion 4611 (save-window-excursion
4612 (let* (queried some-automatic 4612 (let* (queried autosaved-buffers
4613 files-done abbrevs-done) 4613 files-done abbrevs-done)
4614 (dolist (buffer (buffer-list)) 4614 (dolist (buffer (buffer-list))
4615 ;; First save any buffers that we're supposed to save unconditionally. 4615 ;; First save any buffers that we're supposed to save unconditionally.
4616 ;; That way the following code won't ask about them. 4616 ;; That way the following code won't ask about them.
4617 (with-current-buffer buffer 4617 (with-current-buffer buffer
4618 (when (and buffer-save-without-query (buffer-modified-p)) 4618 (when (and buffer-save-without-query (buffer-modified-p))
4619 (setq some-automatic t) 4619 (push (buffer-name) autosaved-buffers)
4620 (save-buffer)))) 4620 (save-buffer))))
4621 ;; Ask about those buffers that merit it, 4621 ;; Ask about those buffers that merit it,
4622 ;; and record the number thus saved. 4622 ;; and record the number thus saved.
@@ -4662,9 +4662,15 @@ change the additional actions you can take on files."
4662 (setq abbrevs-changed nil) 4662 (setq abbrevs-changed nil)
4663 (setq abbrevs-done t))) 4663 (setq abbrevs-done t)))
4664 (or queried (> files-done 0) abbrevs-done 4664 (or queried (> files-done 0) abbrevs-done
4665 (message (if some-automatic 4665 (cond
4666 "(Some special files were saved without asking)" 4666 ((null autosaved-buffers)
4667 "(No files need saving)")))))) 4667 (message "(No files need saving)"))
4668 ((= (length autosaved-buffers) 1)
4669 (message "(Saved %s)" (car autosaved-buffers)))
4670 (t
4671 (message "(Saved %d files: %s)"
4672 (length autosaved-buffers)
4673 (mapconcat 'identity autosaved-buffers ", "))))))))
4668 4674
4669(defun not-modified (&optional arg) 4675(defun not-modified (&optional arg)
4670 "Mark current buffer as unmodified, not needing to be saved. 4676 "Mark current buffer as unmodified, not needing to be saved.