Closed peniblec closed 3 years ago
FWIW, this trivial patch fixes the issue AFAICT:
diff --git a/which-key.el b/which-key.el
index 0fdcb7a..9a334cc 100644
--- a/which-key.el
+++ b/which-key.el
@@ -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)
I'll see if I can add a test case, and put all this together in a PR. Hopefully that's the Right Thing To Do?
Hello!
which-key recently lost the ability to display a keymap's name, when defined like so:
With Emacs 27.2 and 28.0.50, and…
b → +my/buffer-map
.b → +prefix
.(Tested with
git checkout $commit ; $EMACS -Q -l which-key.el -eval '(which-key-mode)' -l repro.el
)I haven't been able to pinpoint where exactly on the
alt-get-bindings
branch the problem appeared.FWIW, it is entirely possible that the way my keymap is defined is "wrong" or convoluted somehow. It is the DRYest way I found to define a prefix command which (1) has a docstring that shows up in M-x describe-keymap (2) has a name that shows up in C-h b (3) has a name that shows up in which-key (up to e236920); I admit that my understanding of keymaps is far from complete, however, so the problem might not lie in which-key.
At any rate, thanks for this great package.