Subject: bug#53773: 27.2; Flyspell delays region overlay update when the region is overwritten

From: Eli Zaretskii <[email-masked]>
Date: Wed, 03 Aug 2022 15:30:07 +0300

> Cc: [email-masked]
> From: Lars Ingebrigtsen <[email-masked]>
> Date: Wed, 03 Aug 2022 13:17:31 +0200
> 
> Andrea Greselin <[email-masked]> writes:
> 
> > Issuing a ‘(deactivate-mark)’ right before the line
> >
> >   (and (not unread-command-events)
> >
> > solves the problem but I don't know if it has any unwanted side
> > effects or if it's a good way to go about it. By the way this bug
> > also affects Emacs 28.1.
> 
> So the proposed change is the patch below, but I'm not really familiar
> with this code.  Anybody have any comments?

LGTM, but please add a comment there mentioning delete-selection-mode
(and I think the added line should be _before_ the comment about the
current command not being delayed).