Subject: Re: bug#78916: 31.0.50; C-g fails to exit loop

From: Stefan Monnier <[email-masked]>
Date: Sat, 05 Jul 2025 10:42:55 -0400

>>> (However, there are other good reason not to apply this patch, and
>>> simply fix read-key to optionally allow quitting instead.
>>
>> The way I see it, part of this bug-report points out a bug in Q&R which
>> applies not just to `C-g` but also to `C-]`, i.e. to any key bound to
>> `quit` in `query-replace-map`, so what you suggest would just
>> re-circumvent that bug for the `C-g` case, leaving the other case broken.
>
> Serious question: doesn't it apply to ESC, too?  It's exit-prefix, not
> quit, but rereading it over and over again also breaks Mike's loop, I
> think.

ESC is bound to `exit-prefix` which is documented as:

    ‘exit-prefix’
         Like ‘exit’, but add the key that was pressed to
         ‘unread-command-events’ (*note Event Input Misc::).

so it looks OK to me: maybe it's not the behavior Mike would prefer, but
at least it's in line with what the doc says.

        Stefan