From 118a911159e75f3ad9305cd7f298816bfb59d715 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Thu, 4 Aug 2022 08:16:45 +0200 Subject: [PATCH] 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). --- lisp/textmodes/flyspell.el | 3 +++ 1 file changed, 3 insertions(+) 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) -- 2.39.5