Subject: Re: bug#59769: 30.0.50; When debugging with M-x gdb, source buffers have RET key rebound to comint-send-input

From: Eli Zaretskii <[email-masked]>
Date: Sat, 03 Dec 2022 11:41:28 +0200

> From: cade david <[email-masked]>
> Date: Fri, 2 Dec 2022 10:44:56 +0100
> 
> In emacs master, when debugging using M-x gdb, all the source buffers
> identified as being part of the debugging session have RET bound to
> comint-send-input. It writes in the minibuffer "Current buffer has no
> process" and it doesn't insert a new line as I would have expected.
> 
> Recipe from emacs -Q:
> 
> M-x gdb emacs
> (in gud buffer)
> start
> (here emacs.c buffer appears, go to it)
> RET -> comint-send-input
> 
> I surmise it has something to do with gud-minor-mode-map that derives
> from gud-mode-map that derives from comint-mode-map.

Thanks.  Yes, this is yet another fallout from commit 8bb5c1b, which redid
the GUD menus aiming to obsolete easy-mmode-defmap.

Note that the above commit also lost the (IMO somewhat useful) feature
whereby TTY frames displayed a tool-bar-like menu items on the menu bar,
allowing TTY frame users with a mouse to debug by pushing "buttons".

After trying to fix this for some time using only the un-obsolete APIs, I
came to the conclusion that doing so, if possible, is above my pay grade.
So I've reverted 8bb5c1b on the emacs-29 branch only (and un-obsoleted the
APIs that were declared obsolete as result of that commit).  On master, the
problem remains, and if someone knows how to fix that with the "modern"
APIs, feel free to do that, and we can later decide whether to backport the
changes to the release branch.

I'm leaving this bug open until it is fixed on master in some way.