branch: externals/which-key
commit e42d946cd98f914a0e9c31fe6cb677305a9f2d30
Author: Justin Burkett <[email protected]>
Commit: Justin Burkett <[email protected]>

    Fix prefix sorting
---
 which-key-tests.el | 2 +-
 which-key.el       | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/which-key-tests.el b/which-key-tests.el
index 0461737..705099b 100644
--- a/which-key-tests.el
+++ b/which-key-tests.el
@@ -189,7 +189,7 @@
                 ("A" . "Z")
                 ("b" . "y")
                 ("B" . "Y")
-                ("p" . "Prefix")
+                ("p" . "prefix")
                 ("SPC" . "x")
                 ("C-a" . "w"))))
     (let ((which-key-sort-uppercase-first t))
diff --git a/which-key.el b/which-key.el
index ec3f760..55e65b8 100644
--- a/which-key.el
+++ b/which-key.el
@@ -1401,7 +1401,8 @@ Uses `string-lessp' after applying lowercase."
   (string-lessp (downcase (cdr acons)) (downcase (cdr bcons))))
 
 (defsubst which-key--group-p (description)
-  (keymapp (intern description)))
+  (or (equal description "prefix")
+      (keymapp (intern description))))
 
 (defun which-key-prefix-then-key-order (acons bcons)
   "Order first by whether A and/or B is a prefix with no prefix

Reply via email to