bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#66792: 30.0.50; describe-keymap shows unreachable parent map binding


From: Eli Zaretskii
Subject: bug#66792: 30.0.50; describe-keymap shows unreachable parent map bindings
Date: Sat, 28 Oct 2023 16:56:04 +0300

> Date: Sun, 29 Oct 2023 02:34:41 +1300
> From: Phil Sainty <psainty@orcon.net.nz>
> 
> The following code demonstrates this bug involving parent keymaps:
> 
> ;; The parent keymap binds key sequence "a b"
> ;; (making "a" a prefix key with a submap).
> 
> (defvar my-keymap-parent
>    (let ((map (make-sparse-keymap)))
>      (define-key map (kbd "a b") 'foo)
>      map))
> 
> ;; The child keymap binds a command directly to "a" meaning
> ;; that the parent's submap is not accessible from the child.
> 
> (defvar my-keymap-child
>    (let ((map (make-sparse-keymap)))
>      (set-keymap-parent map my-keymap-parent)
>      (define-key map (kbd "a") 'bar)
>      map))
> 
> ;; However (describe-keymap 'my-keymap-child) displays the "a b"
> ;; binding as if it were a useable key sequence:
> 
> Key             Binding
> ------------------------
> a               bar
> 
> a b             foo
> 
> 
> I think that this output should only show the "a" binding.

Adding Stefan.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]