From 75a1f8d3bee55d34232cb63b263b07140d756f97 Mon Sep 17 00:00:00 2001
From: shipmints <shipmints@gmail.com>
Date: Thu, 13 Feb 2025 08:10:45 -0500
Subject: [PATCH] Inhibit "Wrote" message in saveplace.el when non-interactive

* 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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/saveplace.el b/lisp/saveplace.el
index d188de29144..1b99387ef5f 100644
--- a/lisp/saveplace.el
+++ b/lisp/saveplace.el
@@ -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 ()
-- 
2.39.5