branch: master
commit caa18b20860fa9b77798da703fccbd3531ce59b2
Author: Justin Burkett <[email protected]>
Commit: Justin Burkett <[email protected]>
Fix descriptions of keys involving meta when showing keymaps
---
which-key.el | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/which-key.el b/which-key.el
index fa865bf..8d7256f 100644
--- a/which-key.el
+++ b/which-key.el
@@ -1658,15 +1658,14 @@ alists. Returns a list (key separator description)."
(let (bindings)
(map-keymap
(lambda (ev def)
- (let ((key (if prefix
- (concat prefix " " (key-description (list ev)))
- (key-description (list ev)))))
- (unless (string-match-p which-key--ignore-keys-regexp key)
+ (let* ((key (append prefix (list ev)))
+ (key-desc (key-description key)))
+ (unless (string-match-p which-key--ignore-keys-regexp key-desc)
(if (and all (keymapp def))
(setq bindings
(append bindings (which-key--get-keymap-bindings def t
key)))
(cl-pushnew
- (cons key
+ (cons key-desc
(cond
((keymapp def) "Prefix Command")
((symbolp def) (copy-sequence (symbol-name def)))