Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Commit

Permalink
Add translation keymap support (#210)
Browse files Browse the repository at this point in the history
a13 authored and justbur committed May 29, 2019
1 parent 77586e6 commit ba03e7e
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions which-key-tests.el
Original file line number Diff line number Diff line change
@@ -130,20 +130,23 @@
(define-key map "c" "c")
(define-key map "dd" "dd")
(define-key map "eee" "eee")
(define-key map "f" [123 45 6])
(should (equal
(sort (which-key--get-keymap-bindings map)
(lambda (a b) (string-lessp (car a) (car b))))
'(("b" . "ignore")
("c" . "c")
("d" . "Prefix Command")
("e" . "Prefix Command"))))
("e" . "Prefix Command")
("f" . "{ - C-f"))))
(should (equal
(sort (which-key--get-keymap-bindings map t)
(lambda (a b) (string-lessp (car a) (car b))))
'(("b" . "ignore")
("c" . "c")
("d d" . "dd")
("e e e" . "eee"))))))
("e e e" . "eee")
("f" . "{ - C-f"))))))

(provide 'which-key-tests)
;;; which-key-tests.el ends here
1 change: 1 addition & 0 deletions which-key.el
Original file line number Diff line number Diff line change
@@ -1741,6 +1741,7 @@ ones. PREFIX is for internal use and should not be used."
((eq 'lambda (car-safe def)) "lambda")
((eq 'menu-item (car-safe def)) "menu-item")
((stringp def) def)
((vectorp def) (key-description def))
(t "unknown")))
bindings :test (lambda (a b) (string= (car a) (car b)))))))))
keymap)

0 comments on commit ba03e7e

Please sign in to comment.