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

From: Stefan Monnier <[email-masked]>
Date: Fri, 04 Jul 2025 14:28:42 -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.

IOW, I don't think your proposal and my patch are exclusive.

Regarding your proposal, I think it makes a lot of sense, especially to
make it easier to convert `read-event` calls to `read-key` (tho
I suspect it would be "more right" to call `keyboard-quit` rather than
`(signal 'quit nil), but that's a bikeshed color I'm not wedded to).

        Stefan