1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-03 08:30:09 +00:00

Fix some keymap names not showing up

Closes #314.
This commit is contained in:
Kévin Le Gouguec 2021-07-18 18:53:14 +02:00
parent 55fcce0c61
commit 5ced0016f6
2 changed files with 9 additions and 1 deletions

View File

@ -44,6 +44,14 @@
("C-b" . "group:mymap")
("C-c" . "group:mymap2"))))))
(ert-deftest which-key-test--named-prefix-keymap ()
(define-prefix-command 'which-key-test--named-map)
(let ((map (make-sparse-keymap)))
(define-key map "\C-a" 'which-key-test--named-map)
(should (equal
(which-key--get-keymap-bindings map)
'(("C-a" . "which-key-test--named-map"))))))
(ert-deftest which-key-test--prefix-declaration ()
"Test `which-key-declare-prefixes' and
`which-key-declare-prefixes-for-mode'. See Bug #109."

View File

@ -1743,8 +1743,8 @@ Requires `which-key-compute-remaps' to be non-nil"
(binding
(cons key-desc
(cond
((keymapp def) "prefix")
((symbolp def) (which-key--compute-binding def))
((keymapp def) "prefix")
((eq 'lambda (car-safe def)) "lambda")
((eq 'closure (car-safe def)) "closure")
((stringp def) def)