unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#62208: 30.0.50; [PATCH] save-some-buffers repeatedly asks for saving abbrev file
@ 2023-03-15 17:42 Filipp Gunbin
  2023-03-15 18:12 ` Filipp Gunbin
  2023-03-16  5:12 ` Eli Zaretskii
  0 siblings, 2 replies; 8+ messages in thread
From: Filipp Gunbin @ 2023-03-15 17:42 UTC (permalink / raw)
  To: 62208


- 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





^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-09-06  1:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-15 17:42 bug#62208: 30.0.50; [PATCH] save-some-buffers repeatedly asks for saving abbrev file Filipp Gunbin
2023-03-15 18:12 ` Filipp Gunbin
2023-03-16  5:12 ` Eli Zaretskii
2023-03-16 14:48   ` Filipp Gunbin
2023-03-16 19:14   ` Filipp Gunbin
2023-03-16 20:10     ` Eli Zaretskii
2023-03-17 14:18       ` Filipp Gunbin
2023-09-06  1:55         ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).