branch: externals/which-key commit d6b56f3e0c0295578db9b88330f1dee38156855e Author: Justin Burkett <jus...@burkett.cc> Commit: Justin Burkett <jus...@burkett.cc>
Fix detection of named prefix bindings --- which-key.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/which-key.el b/which-key.el index ebed572..831e7d5 100644 --- a/which-key.el +++ b/which-key.el @@ -1401,7 +1401,9 @@ Uses `string-lessp' after applying lowercase." (string-lessp (downcase (cdr acons)) (downcase (cdr bcons)))) (defsubst which-key--group-p (description) - (or (equal description "prefix") + (or (string-equal description "prefix") + (and (length> description 6) + (string-equal (substring description 0 6) "group:")) (keymapp (intern description)))) (defun which-key-prefix-then-key-order (acons bcons) @@ -1789,11 +1791,11 @@ Requires `which-key-compute-remaps' to be non-nil" ((keymapp def) "prefix") ((symbolp def) (which-key--compute-binding def)) ((eq 'lambda (car-safe def)) "lambda") - ((eq 'menu-item (car-safe def)) - (which-key--get-menu-item-binding def)) ((stringp def) def) ((vectorp def) (key-description def)) - ((consp def) (car def)) + ((consp def) (concat (when (keymapp (cdr-safe def)) + "group:") + (car def))) (t "unknown"))))) (when (or (null filter) (and (functionp filter)