[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/which-key 7927209 01/10: fix which-key--show-keymap for
From: |
Stefan Monnier |
Subject: |
[elpa] externals/which-key 7927209 01/10: fix which-key--show-keymap for which-key-enable-extended-define-key |
Date: |
Wed, 2 Jun 2021 18:29:39 -0400 (EDT) |
branch: externals/which-key
commit 7927209c1bec93920bf68cf36ddd6832317a0ae7
Author: Jiangbin Zhao <zhaojiangbin@gmail.com>
Commit: Jiangbin Zhao <zhaojiangbin@gmail.com>
fix which-key--show-keymap for which-key-enable-extended-define-key
With which-key-enable-extended-define-key set to 't, given the keymap
and bindings below:
(setq a-map (make-sparse-keymap))
(bind-keys :map a-map
("a" . ("key 1" . command-1))
("b" . ("key b" . command-2)))
The output of (which-key--get-keymap-bindings a-map) was having
"unknown" as the key descriptions.
This change fixes it therefore allows the following to work as
expected:
(which-key--show-keymap "A map" a-map)
---
which-key.el | 3 +++
1 file changed, 3 insertions(+)
diff --git a/which-key.el b/which-key.el
index 8b4c60f..c5652d8 100644
--- a/which-key.el
+++ b/which-key.el
@@ -1823,6 +1823,9 @@ ones. PREFIX is for internal use and should not be used."
(setq bindings
(append bindings
(which-key--get-keymap-bindings def t key))))
+ ((and def (consp def))
+ (cl-pushnew (cons key-desc (car def))
+ bindings :test (lambda (a b) (string= (car a) (car
b)))))
(t
(when def
(cl-pushnew
- [elpa] externals/which-key updated (5fb3030 -> fc29864), Stefan Monnier, 2021/06/02
- [elpa] externals/which-key 7927209 01/10: fix which-key--show-keymap for which-key-enable-extended-define-key,
Stefan Monnier <=
- [elpa] externals/which-key f6ce67d 05/10: Get which-key--buffer's window from any frame, Stefan Monnier, 2021/06/02
- [elpa] externals/which-key fc29864 10/10: Fix whitespace, Stefan Monnier, 2021/06/02
- [elpa] externals/which-key aa91a7c 02/10: Fix nesting-level of "God-mode" section, Stefan Monnier, 2021/06/02
- [elpa] externals/which-key 016b9bb 04/10: Cosmetics, Stefan Monnier, 2021/06/02
- [elpa] externals/which-key fa1b4c9 06/10: Merge pull request #303 from tarsiiformes/posframe, Stefan Monnier, 2021/06/02
- [elpa] externals/which-key 1f5e532 03/10: Avoid code-duplication in which-key--hide-popup, Stefan Monnier, 2021/06/02
- [elpa] externals/which-key ef1fc43 07/10: Reference issues #93 and #175 in README, Stefan Monnier, 2021/06/02
- [elpa] externals/which-key 81d9395 08/10: Fix README links, Stefan Monnier, 2021/06/02
- [elpa] externals/which-key 7e854d0 09/10: Fix recent commit, Stefan Monnier, 2021/06/02