summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/textmodes/flyspell.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index d87cb5e72ed..e4626696262 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -1944,6 +1944,10 @@ spell-check."
(call-interactively flyspell--prev-meta-tab-binding)
(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))
+ (setq flyspell-auto-correct-region nil))
;; Use the correct dictionary.
(flyspell-accept-buffer-local-defs)
(if (and (eq flyspell-auto-correct-pos pos)