From 49c282f301911fd37451d34170472b63bf21650b Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 12 Mar 2021 12:53:39 -0600 Subject: Add `acdw/binds' to bind more than one key at once I should probably change `acdw/bind-after-map' to use this macro... --- lisp/acdw.el | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lisp/acdw.el') 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: `(progn ,@command-list))) +(defmacro acdw/binds (bindings) + "Bind multiple keys at once." + (let (bind-list) + (dolist (bind bindings) + (push `(acdw/bind ,@bind) bind-list)) + `(progn + ,@bind-list))) + ;; convenience (defmacro acdw/bind-after-map (file keymap bindings) "Wrap multiple calls of `acdw/bind' after FILE and with KEYMAP. -- cgit 1.4.1-21-gabe81