diff options
author | John Wiegley <johnw@newartisans.com> | 2014-04-14 08:35:39 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2014-04-14 08:35:39 -0500 |
commit | 978094589e8e7eb6ee2c6bd53290000f9c857ef0 (patch) | |
tree | 7e922058646449f33ed54b7fe6162f7cfe420dc6 /lisp/use-package/bind-key.el | |
parent | efe2419a22b05661d9990386f40ffcf4efbf7d84 (diff) | |
parent | 01196c81ac8aa530781d2d0f30e41621b2c7a3f2 (diff) | |
download | emacs-978094589e8e7eb6ee2c6bd53290000f9c857ef0.tar.gz emacs-978094589e8e7eb6ee2c6bd53290000f9c857ef0.tar.bz2 emacs-978094589e8e7eb6ee2c6bd53290000f9c857ef0.zip |
Merge pull request from npostavs/bind-vectors
bind-keys: bind directly to prefix-map
GitHub-reference: https://github.com/jwiegley/use-package/issues/101
Diffstat (limited to 'lisp/use-package/bind-key.el')
-rw-r--r-- | lisp/use-package/bind-key.el | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lisp/use-package/bind-key.el b/lisp/use-package/bind-key.el index 5ef7570cdef..d2a21f3986b 100644 --- a/lisp/use-package/bind-key.el +++ b/lisp/use-package/bind-key.el @@ -186,14 +186,12 @@ function symbol (unquoted)." `(progn ,@(when prefix-map `((defvar ,prefix-map) - ,@(when doc `((put ',prefix-map'variable-documentation ,doc))) + ,@(when doc `((put ',prefix-map 'variable-documentation ,doc))) (define-prefix-command ',prefix-map) - (bind-key ,prefix ',prefix-map ,@(when map (list map))))) - ,@(mapcar (lambda (form) `(bind-key ,(if prefix - (concat prefix " " (car form)) - (car form)) - ',(cdr form) - ,@(when map (list map)))) + (bind-key ,prefix ',prefix-map ,map))) + ,@(mapcar (lambda (form) + `(bind-key ,(car form) ',(cdr form) + ,(or prefix-map map))) key-bindings)))) (defun get-binding-description (elem) |