Subject: bug#40096: 26.3; set-transient-map does not work with remapped bindings

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 23 May 2022 13:08:37 +0200

Uros Perisic <[email-masked]> writes:

> Here's a recipe to reproduce it starting form emacs -Q:
> #+BEGIN_SRC elisp
> (setq mymap (make-sparse-keymap))
> (defun message-foo () (interactive) (message "foo"))
> (defun message-bar () (interactive) (message "bar"))
> (define-key mymap "f" #'message-foo)
> (set-transient-map mymap t)
> ;; continually press f and note that foo is constantly messaged
> ;; press any other letter and it will stop
> (define-key mymap [remap message-foo] #'message-bar)
> (set-transient-map mymap t)
> ;; note that pressing f only echoes foo once
> #+END_SRC

Thanks for the clear recipe.  I've now fixed this in Emacs 29.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no