refactor(profiles): bootstrap script
- Swap out the funcall+alist lookup for a pcase (which is expanded to a cond, which is is faster and easier to read). - Wrap bootstrap file to $EMACSDIR/profiles/init.el, but byte-compile it to $EMACSDIR/profiles/init.X.el where X is emacs-major-version. - Make doom-profiles-save's second argument optional (defaults to doom-profiles-bootstrap-file). - Make doom-profiles-save throw a error if byte-compilation fails for some reason. - Rename the tempvars to include 'doom' in their name, so debuggers know where they originate.
This commit is contained in:
parent
09d24cd68a
commit
6dffa09c71
3 changed files with 89 additions and 87 deletions
|
@ -70,8 +70,8 @@
|
|||
(dolist (p removed) (print! (item "Removed %S") (car p)))
|
||||
(dolist (p changed) (print! (item "Changed %S") (car p)))
|
||||
(doom-file-write doom-cli-known-profiles-file (list new-profiles) :mode #o600)
|
||||
(doom-profiles-save new-profiles doom-profiles-bootstrap-file)
|
||||
(print! (success "Regenerated profile init file: %s")
|
||||
(doom-profiles-save new-profiles)
|
||||
(print! (success "Regenerated profile bootstrapper: %s")
|
||||
(path doom-profiles-bootstrap-file)))))))))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue