1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-27 02:10:52 -08:00

Support key-chord

Fixes #108
This commit is contained in:
justbur 2016-03-31 10:51:32 -04:00
parent 3150e7d9a4
commit bf4c7d8559

View file

@ -2021,6 +2021,18 @@ Finally, show the buffer."
;; (message "key: %s" (key-description prefix-keys)))
;; (when (> (length prefix-keys) 0)
;; (message "key binding: %s" (key-binding prefix-keys)))
;; Taken from guide-key
(when (and (equal prefix-keys [key-chord])
(bound-and-true-p key-chord-mode))
(setq prefix-keys
(condition-case nil
(let ((rkeys (recent-keys)))
(vector 'key-chord
(aref rkeys (- (length rkeys) 2))
(aref rkeys (- (length rkeys) 1))))
(error (progn
(message "which-key error in key-chord handling")
[key-chord])))))
(cond ((and (> (length prefix-keys) 0)
(or (keymapp (key-binding prefix-keys))
;; Some keymaps are stored here like iso-transl-ctl-x-8-map