Unbreak no-op buffer save message

* lisp/files.el (save-buffer): Pass interactive flag to `basic-save-buffer`
(basic-save-buffer): Accept called-interactively as an argument instead of
directly invoking called-interactively-p, which will always yield nil
in that context.
This commit is contained in:
Daniel Colascione 2015-04-21 12:26:44 -07:00
parent 79fa7d7b75
commit 4364839ea6

View file

@ -4659,7 +4659,7 @@ See the subroutine `basic-save-buffer' for more information."
(not noninteractive)
(not save-silently))
(message "Saving file %s..." (buffer-file-name)))
(basic-save-buffer)
(basic-save-buffer (called-interactively-p 'any))
(and modp (memq arg '(4 64)) (setq buffer-backed-up nil))))
(defun delete-auto-save-file-if-necessary (&optional force)
@ -4701,7 +4701,7 @@ in such cases.")
(make-variable-buffer-local 'save-buffer-coding-system)
(put 'save-buffer-coding-system 'permanent-local t)
(defun basic-save-buffer ()
(defun basic-save-buffer (&optional called-interactively)
"Save the current buffer in its visited file, if it has been modified.
The hooks `write-contents-functions' and `write-file-functions' get a chance
to do the job of saving; if they do not, then the buffer is saved in
@ -4800,7 +4800,7 @@ Before and after saving the buffer, this function runs
(vc-after-save)
(run-hooks 'after-save-hook))
(or noninteractive
(not (called-interactively-p 'any))
(not called-interactively)
(files--message "(No changes need to be saved)")))))
;; This does the "real job" of writing a buffer into its visited file