summaryrefslogtreecommitdiff
path: root/lisp/use-package/bind-key.el
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2014-05-25 12:09:09 -0500
committerJohn Wiegley <johnw@newartisans.com>2014-05-25 12:09:09 -0500
commit0d0e8db731203b732787174ceba509eabcbf2062 (patch)
treea62b4663f903e0683999f2ddec4ba0af6690d3ab /lisp/use-package/bind-key.el
parent2d67e1dca1bf7cf55a80c5acc906df98a8fe42cd (diff)
parentc4ebcaa953ebfcf2445086d5f879f01ef03cc32e (diff)
downloademacs-0d0e8db731203b732787174ceba509eabcbf2062.tar.gz
emacs-0d0e8db731203b732787174ceba509eabcbf2062.tar.bz2
emacs-0d0e8db731203b732787174ceba509eabcbf2062.zip
Merge pull request from alezost/bind-keys
Add bind-keys* GitHub-reference: https://github.com/jwiegley/use-package/issues/107
Diffstat (limited to 'lisp/use-package/bind-key.el')
-rw-r--r--lisp/use-package/bind-key.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/use-package/bind-key.el b/lisp/use-package/bind-key.el
index 2ddbae2f082..0e75fd567ec 100644
--- a/lisp/use-package/bind-key.el
+++ b/lisp/use-package/bind-key.el
@@ -73,6 +73,14 @@
;; Additionally, :prefix-docstring can be specified to set
;; documentation of created :prefix-map variable.
;;
+;; To bind multiple keys in a `bind-key*' way (to be sure that your bindings
+;; will not be overridden by other modes), you may use `bind-keys*' macro:
+;;
+;; (bind-keys*
+;; ("C-o" . other-window)
+;; ("C-M-n" . forward-page)
+;; ("C-M-p" . backward-page))
+;;
;; After Emacs loads, you can see a summary of all your personal keybindings
;; currently in effect with this command:
;;
@@ -194,6 +202,10 @@ function symbol (unquoted)."
,(or prefix-map map)))
key-bindings))))
+(defmacro bind-keys* (&rest args)
+ `(bind-keys :map override-global-map
+ ,@args))
+
(defun get-binding-description (elem)
(cond
((listp elem)