emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 4364839: Unbreak no-op buffer save message


From: Daniel Colascione
Subject: [Emacs-diffs] master 4364839: Unbreak no-op buffer save message
Date: Tue, 21 Apr 2015 19:26:52 +0000

branch: master
commit 4364839ea65448f7159b7b110c472769fc761fe4
Author: Daniel Colascione <address@hidden>
Commit: Daniel Colascione <address@hidden>

    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.
---
 lisp/files.el |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/files.el b/lisp/files.el
index 152f155..fd7293b 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -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



reply via email to

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