]> code.delx.au - gnu-emacs/commitdiff
* lisp/files.el: Don't message when nothing happened
authorArtur Malabarba <bruce.connor.am@gmail.com>
Sun, 12 Apr 2015 11:01:24 +0000 (12:01 +0100)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Sun, 12 Apr 2015 12:45:30 +0000 (13:45 +0100)
(save-some-buffers, basic-save-buffer): Before messaging to say
"nothing was saved" check if (called-interactively-p 'any).

lisp/files.el

index eca52e0ddd3e3b5588cb6c41f8af43b0ab2a973b..7a662594bb667eea1762a291ecdd024184dbbbf5 100644 (file)
@@ -4783,7 +4783,9 @@ Before and after saving the buffer, this function runs
          ;; Support VC `implicit' locking.
          (vc-after-save)
          (run-hooks 'after-save-hook))
-      (or noninteractive (message "(No changes need to be saved)")))))
+      (or noninteractive
+          (not (called-interactively-p 'any))
+          (message "(No changes need to be saved)")))))
 
 ;; This does the "real job" of writing a buffer into its visited file
 ;; and making a backup file.  This is what is normally done
@@ -5024,7 +5026,8 @@ change the additional actions you can take on files."
       (or queried (> files-done 0) abbrevs-done
          (cond
           ((null autosaved-buffers)
-           (message "(No files need saving)"))
+            (when (called-interactively-p 'any)
+              (message "(No files need saving)")))
           ((= (length autosaved-buffers) 1)
            (message "(Saved %s)" (car autosaved-buffers)))
           (t