mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-05 22:20:24 -08:00
Reset abbrevs-changed after saving abbrevs (bug#62208)
* lisp/abbrev.el (abbrev--possibly-save): Reset abbrevs-changed after saving abbrevs. * test/lisp/abbrev-tests.el (abbrev--possibly-save-test): New test.
This commit is contained in:
parent
e8cee15f78
commit
c54bda15e3
2 changed files with 27 additions and 11 deletions
|
|
@ -1250,17 +1250,17 @@ which see."
|
|||
;; 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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue