Subject: Re: bug#70938: 30.0.50; Edebug appropriates overriding-terminal-local-map

From: Michael Heerdegen <[email-masked]>
Date: Wed, 15 May 2024 00:02:51 +0200

Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife
of text editors" <[email-masked]> writes:

> But what can we do - does anyone have a good idea?  Could the cleanup
> code that removes the transient map maybe check whether the variable
> `overriding-terminal-local-map' it sees is really the global one?

Here is a recipe that doesn't involve Edebug (please use a separate
emacs session to try) but does the same thing:

#+begin_src emacs-lisp
(progn
  (set-transient-map (let ((m (make-sparse-keymap)))
                       (define-key m [?^]
                         (lambda () (interactive) (message "Hmm...")))
                       m))
  (let ((overriding-terminal-local-map nil))
    (recursive-edit)))
#+end_src

After evaluating this, whenever one returns to top-level one is stuck
with the transient map (just hit ^ to check).

Michael.