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

From: Eli Zaretskii <[email-masked]>
Date: Wed, 02 Jul 2025 14:39:07 +0300

> From: Richard Stallman <[email-masked]>
> Cc: [email-masked], [email-masked], [email-masked]
> Date: Tue, 01 Jul 2025 22:10:44 -0400
> 
> C-g and C-] are intentionally different.  C-g quits out of commands,
> while C-] exis a recursive edit.  The two commands exist because
> they are different, and both useful.

That is true in general, but we are talking about the effects of these
two inside query-replace, where they both are bound to the same
function.

> We want to fix the bug that affects C-g.  But what should C-] do here?
> 
> Its definition is to quit out of the innermos recursive edit.
> But I don't think there is a recursive edit going on in this example.
> query-replace-regexp doesn't use a recursive edit to read
> the user's input.
> 
> Quitting out of the current command seems like a reaosnable think
> for C-] to do when there is no recursive edit in progress.

Exactly.  So in this case C-g and C-] are supposed to have the same
effect, I think.