]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix flyspell-auto-correct-previous-word broken by recent change
authorEli Zaretskii <eliz@gnu.org>
Tue, 17 Apr 2018 17:45:51 +0000 (20:45 +0300)
committerEli Zaretskii <eliz@gnu.org>
Tue, 17 Apr 2018 17:45:51 +0000 (20:45 +0300)
* lisp/textmodes/flyspell.el (flyspell-auto-correct-word): Keep
flyspell-auto-correct-region also when repeatedly invoking
flyspell-auto-correct-previous-word.  (Bug#31188)

lisp/textmodes/flyspell.el

index e46266962625ad4ad73d98ad6122265a8947eded..24e424c663c2837ee1e59f6e6f5f5d006967957b 100644 (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)