diff options
| -rw-r--r-- | which-key-tests.el | 7 | ||||
| -rw-r--r-- | which-key.el | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/which-key-tests.el b/which-key-tests.el index 3e75d6fa62c..cff7fab56e6 100644 --- a/which-key-tests.el +++ b/which-key-tests.el | |||
| @@ -130,20 +130,23 @@ | |||
| 130 | (define-key map "c" "c") | 130 | (define-key map "c" "c") |
| 131 | (define-key map "dd" "dd") | 131 | (define-key map "dd" "dd") |
| 132 | (define-key map "eee" "eee") | 132 | (define-key map "eee" "eee") |
| 133 | (define-key map "f" [123 45 6]) | ||
| 133 | (should (equal | 134 | (should (equal |
| 134 | (sort (which-key--get-keymap-bindings map) | 135 | (sort (which-key--get-keymap-bindings map) |
| 135 | (lambda (a b) (string-lessp (car a) (car b)))) | 136 | (lambda (a b) (string-lessp (car a) (car b)))) |
| 136 | '(("b" . "ignore") | 137 | '(("b" . "ignore") |
| 137 | ("c" . "c") | 138 | ("c" . "c") |
| 138 | ("d" . "Prefix Command") | 139 | ("d" . "Prefix Command") |
| 139 | ("e" . "Prefix Command")))) | 140 | ("e" . "Prefix Command") |
| 141 | ("f" . "{ - C-f")))) | ||
| 140 | (should (equal | 142 | (should (equal |
| 141 | (sort (which-key--get-keymap-bindings map t) | 143 | (sort (which-key--get-keymap-bindings map t) |
| 142 | (lambda (a b) (string-lessp (car a) (car b)))) | 144 | (lambda (a b) (string-lessp (car a) (car b)))) |
| 143 | '(("b" . "ignore") | 145 | '(("b" . "ignore") |
| 144 | ("c" . "c") | 146 | ("c" . "c") |
| 145 | ("d d" . "dd") | 147 | ("d d" . "dd") |
| 146 | ("e e e" . "eee")))))) | 148 | ("e e e" . "eee") |
| 149 | ("f" . "{ - C-f")))))) | ||
| 147 | 150 | ||
| 148 | (provide 'which-key-tests) | 151 | (provide 'which-key-tests) |
| 149 | ;;; which-key-tests.el ends here | 152 | ;;; which-key-tests.el ends here |
diff --git a/which-key.el b/which-key.el index f4b15c4806a..99318d5f320 100644 --- a/which-key.el +++ b/which-key.el | |||
| @@ -1741,6 +1741,7 @@ ones. PREFIX is for internal use and should not be used." | |||
| 1741 | ((eq 'lambda (car-safe def)) "lambda") | 1741 | ((eq 'lambda (car-safe def)) "lambda") |
| 1742 | ((eq 'menu-item (car-safe def)) "menu-item") | 1742 | ((eq 'menu-item (car-safe def)) "menu-item") |
| 1743 | ((stringp def) def) | 1743 | ((stringp def) def) |
| 1744 | ((vectorp def) (key-description def)) | ||
| 1744 | (t "unknown"))) | 1745 | (t "unknown"))) |
| 1745 | bindings :test (lambda (a b) (string= (car a) (car b))))))))) | 1746 | bindings :test (lambda (a b) (string= (car a) (car b))))))))) |
| 1746 | keymap) | 1747 | keymap) |