Subject: Re: bug#37352: 27.0.50; recursive-edit aborts on elisp error after evaluation

From: Noam Postavsky <[email-masked]>
Date: Sun, 22 Sep 2019 12:39:31 -0400

On Sun, 22 Sep 2019 at 12:15, Drew Adams <[email-masked]> wrote:
>
> > I don't know why the `q' command in the debugging mode
> > is defined that way.
>
> Uh, because it makes sense?  The recursive edit
> was entered only for use of the debugger.

There are two recursive edits, one that the OP entered from their code
(I assume for the edit-file-and-return-as-string stuff [1]), and a
second nested one that happend after an error was signaled and the
debugger was invoked. Then quitting the debugger exits both recursive
edits, because q is bound to top-level in debugger-mode, and top-level
aborts all recursive edits, not just the latest one.

A possible solution might be to bind q to a command which quits
recursive edits only up to the one that the debugger invoked.

[1]: https://lists.gnu.org/archive/html/help-gnu-emacs/2019-08/msg00051.html