bind-keys: bind directly to prefix-map

instead of constructing equivalent key sequence by string concatenation.
This allows specifying vector key sequences, as in bind-key (since
f0776c2aeb).
This commit is contained in:
Noam Postavsky 2014-04-13 23:55:06 -04:00
parent 869ff53ab9
commit 01196c81ac

View file

@ -189,11 +189,9 @@ function symbol (unquoted)."
,@(when doc `((put ',prefix-map 'variable-documentation ,doc))) ,@(when doc `((put ',prefix-map 'variable-documentation ,doc)))
(define-prefix-command ',prefix-map) (define-prefix-command ',prefix-map)
(bind-key ,prefix ',prefix-map ,map))) (bind-key ,prefix ',prefix-map ,map)))
,@(mapcar (lambda (form) `(bind-key ,(if prefix ,@(mapcar (lambda (form)
(concat prefix " " (car form)) `(bind-key ,(car form) ',(cdr form)
(car form)) ,(or prefix-map map)))
',(cdr form)
,map))
key-bindings)))) key-bindings))))
(defun get-binding-description (elem) (defun get-binding-description (elem)