branch: externals/which-key
commit 7abe54fa1d4aa714d9414bc6877ef2124ce126fe
Author: Justin Burkett <jus...@burkett.cc>
Commit: Justin Burkett <jus...@burkett.cc>

    Handle closure definition type
    
    Fixes #311
---
 which-key.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/which-key.el b/which-key.el
index 67b185f..1213d14 100644
--- a/which-key.el
+++ b/which-key.el
@@ -1790,11 +1790,15 @@ 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 'closure (car-safe def)) "closure")
                             ((stringp def) def)
                             ((vectorp def) (key-description def))
-                            ((consp def) (concat (when (keymapp (cdr-safe def))
-                                                   "group:")
-                                                 (car def)))
+                            ((and (consp def)
+                                  ;; looking for (STRING . DEFN)
+                                  (stringp (car def)))
+                             (concat (when (keymapp (cdr-safe def))
+                                       "group:")
+                                     (car def)))
                             (t "unknown")))))
                (when (or (null filter)
                          (and (functionp filter)

Reply via email to