From: Lars Ingebrigtsen Date: Thu, 4 Aug 2022 06:16:45 +0000 (+0200) Subject: Make flyspell-check-word-p work better with delete-selection-mode X-Git-Tag: emacs-29.0.90~1447^2~485 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=118a911159e75f3ad9305cd7f298816bfb59d715;p=emacs.git Make flyspell-check-word-p work better with delete-selection-mode * lisp/textmodes/flyspell.el (flyspell-check-word-p): Deactivate the region immediately (bug#53773). --- diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 2c5e30fecd8..2ee20ef1d45 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -854,6 +854,9 @@ Mostly we check word delimiters." ((get this-command 'flyspell-deplacement) (not (eq flyspell-previous-command this-command))) ((get this-command 'flyspell-delayed) + ;; In case we're using `delete-selection-mode', make the + ;; region be updated immediately. + (deactivate-mark) ;; The current command is not delayed, that ;; is that we must check the word now. (and (not unread-command-events)