From c4ebcaa953ebfcf2445086d5f879f01ef03cc32e Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Sun, 25 May 2014 13:04:00 +0400 Subject: [PATCH] Add bind-keys* macro --- lisp/use-package/bind-key.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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) -- 2.39.2