From: Eli Zaretskii Date: Tue, 17 Apr 2018 17:45:51 +0000 (+0300) Subject: Fix flyspell-auto-correct-previous-word broken by recent change X-Git-Tag: emacs-26.1~70 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3bdc9a1;p=emacs.git 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) --- diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index e4626696262..24e424c663c 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -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)