summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
authorCase Duckworth2021-03-12 12:53:39 -0600
committerCase Duckworth2021-03-12 12:53:57 -0600
commit49c282f301911fd37451d34170472b63bf21650b (patch)
tree3be1e2b8703e8917600ded7f6a77d7432bf46d58 /lisp
parentChange `add-hook' to `acdw/hooks' (diff)
downloademacs-49c282f301911fd37451d34170472b63bf21650b.tar.gz
emacs-49c282f301911fd37451d34170472b63bf21650b.zip
Add `acdw/binds' to bind more than one key at once
I should probably change `acdw/bind-after-map' to use this macro...
Diffstat (limited to 'lisp')
-rw-r--r--lisp/acdw.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el index 3ae480d..c9a2d9f 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el
@@ -205,6 +205,14 @@ The following keywords are recognized:
205 `(progn 205 `(progn
206 ,@command-list))) 206 ,@command-list)))
207 207
208(defmacro acdw/binds (bindings)
209 "Bind multiple keys at once."
210 (let (bind-list)
211 (dolist (bind bindings)
212 (push `(acdw/bind ,@bind) bind-list))
213 `(progn
214 ,@bind-list)))
215
208;; convenience 216;; convenience
209(defmacro acdw/bind-after-map (file keymap bindings) 217(defmacro acdw/bind-after-map (file keymap bindings)
210 "Wrap multiple calls of `acdw/bind' after FILE and with KEYMAP. 218 "Wrap multiple calls of `acdw/bind' after FILE and with KEYMAP.