]> git.eshelyaron.com Git - emacs.git/commitdiff
Inhibit "Wrote" message in saveplace.el when non-interactive
authorshipmints <shipmints@gmail.com>
Thu, 13 Feb 2025 13:10:45 +0000 (08:10 -0500)
committerEshel Yaron <me@eshelyaron.com>
Sun, 23 Feb 2025 08:10:15 +0000 (09:10 +0100)
* lisp/saveplace.el (save-place-alist-to-file): Tell 'write-region'
to be quiet when called non-interactively.  This is in harmony with
'savehist-save'.  (Bug#76267)

(cherry picked from commit 8f45cbdee45317faa978732fa5311c3c056b559f)

lisp/saveplace.el

index d188de29144599f0255aa2e012bd0fe3f1535f87..1b99387ef5fc2b3bb168550302e2444c99fe7fcb 100644 (file)
@@ -401,7 +401,8 @@ may have changed) back to `save-place-alist'."
                t))))
        (condition-case nil
            ;; Don't use write-file; we don't want this buffer to visit it.
-            (write-region (point-min) (point-max) file)
+            (write-region (point-min) (point-max) file nil
+                         (unless (called-interactively-p 'interactive) 'quiet))
          (file-error (message "Saving places: can't write %s" file)))))))
 
 (defun save-places-to-alist ()