From 74ffce06536e935dd8ec2ba45b5658a1a70bedc3 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 1 Sep 2021 21:15:57 -0500 Subject: 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. --- early-init.el | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'early-init.el') 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." before-init-time))) gcs-done)) +;;; `setup' +(straight-use-package '(setup :host nil :repo "https://git.sr.ht/~pkal/setup")) +(require 'setup) + +(setup setup + ;; Install a package using `straight-use-package' + (setup-define :straight + (lambda (recipe) + `(straight-use-package ',recipe)) + :documentation + "Install RECIPE with `straight-use-package'. +This macro can be used as HEAD, and will replace itself with the +first RECIPE's package." + :repeatable t + :shorthand (lambda (sexp) + (let ((recipe (cadr sexp))) + (if (consp recipe) + (car recipe) + recipe)))) + ;; Install a package with straight, but only under a condition + (setup-define :straight-if + (lambda (recipe condition) + `(if ,condition + (straight-use-package ',recipe) + ,(setup-quit))) + :documentation + "Install RECIPE with `straight-use-package' when CONDITION is met. +If CONDITION is false, stop evaluating the body. This macro can +be used as HEAD, and will replace itself with the RECIPE's +package. This macro is not repeatable." + :repeatable nil + :shorthand (lambda (sexp) + (let ((recipe (cadr sexp))) + (if (consp recipe) (car recipe) recipe))))) + +;;; `no-littering' +(setup (:straight no-littering) + (:option no-littering-etc-directory (acdw/dir) + no-littering-var-directory (acdw/dir)) + (require 'no-littering)) + ;;; early-init.el ends here -- cgit 1.4.1-21-gabe81