1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

Fix flyspell-auto-correct-previous-word broken by recent change

* lisp/textmodes/flyspell.el (flyspell-auto-correct-word): Keep
flyspell-auto-correct-region also when repeatedly invoking
flyspell-auto-correct-previous-word.  (Bug#31188)
This commit is contained in:
Eli Zaretskii 2018-04-17 20:45:51 +03:00
parent a539eb51ac
commit 3bdc9a1683

View File

@ -1945,8 +1945,9 @@ spell-check."
(let ((pos (point))
(old-max (point-max)))
;; Flush a possibly stale cache from previous invocations of
;; flyspell-auto-correct-word.
(if (not (eq last-command 'flyspell-auto-correct-word))
;; flyspell-auto-correct-word/flyspell-auto-correct-previous-word.
(if (not (memq last-command '(flyspell-auto-correct-word
flyspell-auto-correct-previous-word)))
(setq flyspell-auto-correct-region nil))
;; Use the correct dictionary.
(flyspell-accept-buffer-local-defs)