Subject: bug#35397: flyspell-mode affects delete-selection-mode

From: Stefan Kangas <[email-masked]>
Date: Sun, 30 Jun 2019 18:49:09 +0200

Евгений Курневский <[email-masked]> writes:

> Emacs version: 26.2
> Steps to reproduce:
> emacs -Q
> M-x delete-selection-mode
> M-x flyspell-mode
> Type one word, select it and type one character. This character will be selected for flyspell-delay seconds.
> Desired behavior - selection disappears right after new character is inserted, as without flyspell-mode.

I tried the following steps:

0. emacs -Q
1. M-x delete-selection-mode
2. M-x flyspell-mode
3. foobar C-SPC C-a x

What I see is that "x" is highlighted for flyspell-delay seconds.  If I
continue typing before that, the highlighting immediately disappears.
If I type "1" instead of "x", there is no highlighting.

Crucially, the "x" does not get replaced by subsequent characters, as it
would have been under delete-selection-mode if the "x" was actually
selected.  In other words, if you change step three to:

3. foobar C-SPC C-a xyz

You see a buffer containing "xyz".

Thus, the problem seems to be the highlighting only, which could perhaps
be somewhat confusing to a user.  I think this is indeed a bug (or
buglet), although its mostly cosmetic.

Could you please confirm this, or are you talking about something else?

Thanks,
Stefan Kangas