Subject: bug#62208: 30.0.50; [PATCH] save-some-buffers repeatedly asks for saving abbrev file

From: Filipp Gunbin <[email-masked]>
Date: Wed, 15 Mar 2023 20:42:31 +0300

- emacs -Q
- Define an abbrev using C-x a g
- C-x s, answer "yes"
- Repeat C-x s, it again asks to save abbrevs

This is a regression since 28.1.

diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index ef8ef1ab5a6..1a665efb0a5 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -1250,17 +1250,17 @@ abbrev--possibly-save
     ;; asked to.
     (and save-abbrevs
          abbrevs-changed
-         (progn
-	   (if (or arg
-		   (eq save-abbrevs 'silently)
-		   (y-or-n-p (format "Save abbrevs in %s? " abbrev-file-name)))
-	       (progn
-                 (write-abbrev-file nil)
-                 nil)
-	     ;; Don't keep bothering user if they say no.
-	     (setq abbrevs-changed nil)
-             ;; Inhibit message in `save-some-buffers'.
-	     t)))))
+         (prog1
+	     (if (or arg
+		     (eq save-abbrevs 'silently)
+		     (y-or-n-p (format "Save abbrevs in %s? " abbrev-file-name)))
+	         (progn
+                   (write-abbrev-file nil)
+                   nil)
+               ;; Inhibit message in `save-some-buffers'.
+	       t)
+           ;; Don't ask again whether saved or user said no.
+           (setq abbrevs-changed nil)))))
 
 (add-hook 'save-some-buffers-functions #'abbrev--possibly-save)

In GNU Emacs 30.0.50 (build 3, x86_64-apple-darwin20.6.0, NS
 appkit-2202.70 Version 11.7 (Build 20G817)) of 2023-03-15 built on
 fgunbin.local
Repository revision: 67a660eb13818a620b301775065c4819a2178428
Repository branch: master
System Description:  macOS 11.7