diff options
| author | Daniel Colascione | 2015-04-21 12:26:44 -0700 |
|---|---|---|
| committer | Daniel Colascione | 2015-04-21 12:26:44 -0700 |
| commit | 4364839ea65448f7159b7b110c472769fc761fe4 (patch) | |
| tree | c1e71656010e04a75ba8a774396fdf15b72a2cfa | |
| parent | 79fa7d7b75fa71d4332675ca28608b484731e09a (diff) | |
| download | emacs-4364839ea65448f7159b7b110c472769fc761fe4.tar.gz emacs-4364839ea65448f7159b7b110c472769fc761fe4.zip | |
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.
| -rw-r--r-- | lisp/files.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/files.el b/lisp/files.el index 152f1554279..fd7293bf8a0 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -4659,7 +4659,7 @@ See the subroutine `basic-save-buffer' for more information." | |||
| 4659 | (not noninteractive) | 4659 | (not noninteractive) |
| 4660 | (not save-silently)) | 4660 | (not save-silently)) |
| 4661 | (message "Saving file %s..." (buffer-file-name))) | 4661 | (message "Saving file %s..." (buffer-file-name))) |
| 4662 | (basic-save-buffer) | 4662 | (basic-save-buffer (called-interactively-p 'any)) |
| 4663 | (and modp (memq arg '(4 64)) (setq buffer-backed-up nil)))) | 4663 | (and modp (memq arg '(4 64)) (setq buffer-backed-up nil)))) |
| 4664 | 4664 | ||
| 4665 | (defun delete-auto-save-file-if-necessary (&optional force) | 4665 | (defun delete-auto-save-file-if-necessary (&optional force) |
| @@ -4701,7 +4701,7 @@ in such cases.") | |||
| 4701 | (make-variable-buffer-local 'save-buffer-coding-system) | 4701 | (make-variable-buffer-local 'save-buffer-coding-system) |
| 4702 | (put 'save-buffer-coding-system 'permanent-local t) | 4702 | (put 'save-buffer-coding-system 'permanent-local t) |
| 4703 | 4703 | ||
| 4704 | (defun basic-save-buffer () | 4704 | (defun basic-save-buffer (&optional called-interactively) |
| 4705 | "Save the current buffer in its visited file, if it has been modified. | 4705 | "Save the current buffer in its visited file, if it has been modified. |
| 4706 | The hooks `write-contents-functions' and `write-file-functions' get a chance | 4706 | The hooks `write-contents-functions' and `write-file-functions' get a chance |
| 4707 | to do the job of saving; if they do not, then the buffer is saved in | 4707 | 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 | |||
| 4800 | (vc-after-save) | 4800 | (vc-after-save) |
| 4801 | (run-hooks 'after-save-hook)) | 4801 | (run-hooks 'after-save-hook)) |
| 4802 | (or noninteractive | 4802 | (or noninteractive |
| 4803 | (not (called-interactively-p 'any)) | 4803 | (not called-interactively) |
| 4804 | (files--message "(No changes need to be saved)"))))) | 4804 | (files--message "(No changes need to be saved)"))))) |
| 4805 | 4805 | ||
| 4806 | ;; This does the "real job" of writing a buffer into its visited file | 4806 | ;; This does the "real job" of writing a buffer into its visited file |