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

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 06 Sep 2023 01:56:02 +0000

Your bug report

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

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
62208: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62208
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#62208: 30.0.50; [PATCH] save-some-buffers repeatedly asks for saving abbrev file
From: Stefan Kangas <[email-masked]>
To: Filipp Gunbin <[email-masked]>
Cc: Eli Zaretskii <[email-masked]>, [email-masked]
Date: Tue, 5 Sep 2023 18:55:11 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Filipp Gunbin <[email-masked]> writes:

> fixed 62208 29.1
> quit
>
> On 16/03/2023 22:10 +0200, Eli Zaretskii wrote:
>
>>> From: Filipp Gunbin <[email-masked]>
>>> Cc: [email-masked]
>>> Date: Thu, 16 Mar 2023 22:14:01 +0300
>>>
>>> On 16/03/2023 07:12 +0200, Eli Zaretskii wrote:
>>>
>>> > Also, would it be possible to add a test for this issue?
>>>
>>> Now added test, full patch is below.
>>>
>>> If/when it's fine, where should I install this?
>>
>> Thanks, please install on the emacs-29 branch.
>
> Installed and closing this bug, thanks.

This seems ho have accidentally been left open, so I'm closing it now.

Subject: 30.0.50; [PATCH] save-some-buffers repeatedly asks for saving abbrev file
From: Filipp Gunbin <[email-masked]>
To: [email-masked]
Date: Wed, 15 Mar 2023 20:42:31 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

- 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