summary refs log tree commit diff stats
path: root/early-init.el
diff options
context:
space:
mode:
authorCase Duckworth2021-09-01 21:15:57 -0500
committerCase Duckworth2021-09-01 21:15:57 -0500
commit74ffce06536e935dd8ec2ba45b5658a1a70bedc3 (patch)
treef97aca98479caf23d10d2fe3f996554ad49288ea /early-init.el
parentChange warn to message (diff)
downloademacs-74ffce06536e935dd8ec2ba45b5658a1a70bedc3.tar.gz
emacs-74ffce06536e935dd8ec2ba45b5658a1a70bedc3.zip
Reorganize
I've moved the preamble stuff to early-init.el, and I ran `sort-sexps' on the
first and then second page of init.el.
Diffstat (limited to 'early-init.el')
-rw-r--r--early-init.el41
1 files changed, 41 insertions, 0 deletions
diff --git a/early-init.el b/early-init.el index e8d02ad..9f8e7f0 100644 --- a/early-init.el +++ b/early-init.el
@@ -191,4 +191,45 @@ say, `tool-bar-mode' once to toggle the tool bar back on."
191 before-init-time))) 191 before-init-time)))
192 gcs-done)) 192 gcs-done))
193 193
194;;; `setup'
195(straight-use-package '(setup :host nil :repo "https://git.sr.ht/~pkal/setup"))
196(require 'setup)
197
198(setup setup
199 ;; Install a package using `straight-use-package'
200 (setup-define :straight
201 (lambda (recipe)
202 `(straight-use-package ',recipe))
203 :documentation
204 "Install RECIPE with `straight-use-package'.
205This macro can be used as HEAD, and will replace itself with the
206first RECIPE's package."
207 :repeatable t
208 :shorthand (lambda (sexp)
209 (let ((recipe (cadr sexp)))
210 (if (consp recipe)
211 (car recipe)
212 recipe))))
213 ;; Install a package with straight, but only under a condition
214 (setup-define :straight-if
215 (lambda (recipe condition)
216 `(if ,condition
217 (straight-use-package ',recipe)
218 ,(setup-quit)))
219 :documentation
220 "Install RECIPE with `straight-use-package' when CONDITION is met.
221If CONDITION is false, stop evaluating the body. This macro can
222be used as HEAD, and will replace itself with the RECIPE's
223package. This macro is not repeatable."
224 :repeatable nil
225 :shorthand (lambda (sexp)
226 (let ((recipe (cadr sexp)))
227 (if (consp recipe) (car recipe) recipe)))))
228
229;;; `no-littering'
230(setup (:straight no-littering)
231 (:option no-littering-etc-directory (acdw/dir)
232 no-littering-var-directory (acdw/dir))
233 (require 'no-littering))
234
194;;; early-init.el ends here 235;;; early-init.el ends here