]> git.eshelyaron.com Git - emacs.git/commitdiff
Add bind-keys* macro
authorAlex Kost <alezost@gmail.com>
Sun, 25 May 2014 09:04:00 +0000 (13:04 +0400)
committerAlex Kost <alezost@gmail.com>
Sun, 25 May 2014 13:33:20 +0000 (17:33 +0400)
lisp/use-package/bind-key.el

index 2ddbae2f082e50d1f26086b84700d57828becdab..0e75fd567ec2120e0d3063fccb071d76262ab83b 100644 (file)
 ;; 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)