GNU bug report logs -
#78435
30.1; abbrev-edit-save-buffer doesn't reset abbrevs-changed OR...
Previous Next
Reported by: Rick <rbielaws <at> gmail.com>
Date: Thu, 15 May 2025 05:43:03 UTC
Severity: normal
Found in version 30.1
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 78435 <at> debbugs.gnu.org (full text, mbox):
> Date: Wed, 14 May 2025 18:45:00 -0500
> From: Rick <rbielaws <at> gmail.com>
>
> Given:
> 1) Starting with -Q does exhibit the problem but I can't reconfigure just now
> 2) I don't use client mode
> 3) (save-abbrevs 'silently) ;; is required to exhibit problem
>
> M-x edit-abbrev
> Make any arbitrary change
> C-x C-s ;; save the changes
> M-x kill-buffer ;; optional
> M-: abbrevs-changed yields t ;; flag is still set despite changes being saved
>
> Click the application [x] (top right corner of the frame) to exit Emacs.
>
> Expectation:
> Since there are no unsaved changes, Emacs should exit normally.
> Even if the changes are somehow technically still considered unsaved (although
> I can't see why) the save should still be silent. Or, in the case of (save-abbrevs t)
> there doesn't seem to be a way to tell that it's the abbrevs that want saving so
> deciding how to answer is a dilemma.
>
> What actually happens:
> Emacs prompts if I want to save unsaved changes before quitting but gives no
> indication of what changes are outstanding. No buffers are visiting files so
> troubleshooting was arduous until I noticed the correlation with abbrev-mode.
>
> As a temporary fix I did this:
>
> (defadvice abbrev-edit-save-buffer (after my-abbrev-edit-save-buffer last activate)
> "Insure that abbrevs-changed is reset after abbrevs are saved."
> (setq abbrevs-changed nil)
> )
>
> I see no drawbacks to the setq being in abbrev-edit-save-buffer since the target
> file in that function is the canonical abbrev-file-name. Otherwise, only the
> abbrev--possibly-save hook on save-some-buffers-functions ever resets it.
Thanks, I've installed that change on the emacs-30 branch, and I'm
therefore closing this bug.
This bug report was last modified 57 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.