about summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
authorCase Duckworth2021-03-12 17:32:13 -0600
committerCase Duckworth2021-03-12 17:32:13 -0600
commit884343deb4c9c7837356b27968c1e594d8730d49 (patch)
tree2005cf04dfdb5ae5a947cf4de79cd462932507d7 /lisp
parentChange `acdw/hooks' form (diff)
downloademacs-884343deb4c9c7837356b27968c1e594d8730d49.tar.gz
emacs-884343deb4c9c7837356b27968c1e594d8730d49.zip
Add `:set', `:local', `:require' keywords to `acdw/pkg'
Diffstat (limited to 'lisp')
-rw-r--r--lisp/acdw.el27
1 files changed, 20 insertions, 7 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el index 6641e9b..002f8f6 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el
@@ -191,13 +191,21 @@ KEYMAP can be nil."
191 191
192ARGS can include the following keywords: 192ARGS can include the following keywords:
193 193
194:now FORMS .. run forms immediately. 194:local BOOL .. if BOOL is non-nil, don't run `straight-use-package' on
195 Good for settings and auxiliary functions. 195 PACKAGE. Good for using `acdw/pkg' on local features.
196:then FORMS .. run forms after loading PACKAGE, using `with-eval-after-load'. 196:require BOOL .. if BOOL is non-nil, run `require' on PACKAGE before anything.
197:binds BINDS .. run `acdw/bind-after-map' on BINDS. 197:now FORMS .. run FORMS immediately.
198:hooks HOOKS .. run `acdw/hooks-after' on HOOKS." 198:then FORMS .. run FORMS after loading PACKAGE, using `with-eval-after-load'.
199:set SETTINGS .. pass SETTINGS to `acdw/set', right after `:now' forms.
200 SETTINGS should be properly quoted, just like they'd be passed
201 to the function.
202:binds BINDS .. run `acdw/bind-after-map' on BINDS.
203:hooks HOOKS .. run `acdw/hooks' on HOOKS."
199 (declare (indent 1)) 204 (declare (indent 1))
200 (let ((now-forms (plist-get args :now)) 205 (let ((local-pkg (plist-get args :local))
206 (require-pkg (plist-get args :require))
207 (now-forms (plist-get args :now))
208 (settings (plist-get args :set))
201 (binds (plist-get args :binds)) 209 (binds (plist-get args :binds))
202 (hooks (plist-get args :hooks)) 210 (hooks (plist-get args :hooks))
203 (then-forms (plist-get args :then)) 211 (then-forms (plist-get args :then))
@@ -212,9 +220,14 @@ ARGS can include the following keywords:
212 (when binds 220 (when binds
213 (push `(acdw/bind-after-map ,(symbol-name requirement) nil ,binds) 221 (push `(acdw/bind-after-map ,(symbol-name requirement) nil ,binds)
214 final-form)) 222 final-form))
223 (when settings
224 (push `(acdw/set ,settings) final-form))
215 (when now-forms 225 (when now-forms
216 (push `(progn ,@now-forms) final-form)) 226 (push `(progn ,@now-forms) final-form))
217 (push `(straight-use-package ',package) final-form) 227 (unless local-pkg
228 (push `(straight-use-package ',package) final-form))
229 (when require-pkg
230 (push `(require ',requirement) final-form))
218 `(progn 231 `(progn
219 ,@final-form))) 232 ,@final-form)))
220 233