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

From: Richard Stallman <[email-masked]>
Date: Tue, 01 Jul 2025 22:10:44 -0400

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

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.

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.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)