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.
This commit is contained in:
parent
1e75668c18
commit
74ffce0653
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue