Refactor evaluation of doom!'s arguments

And update doom!'s docstring
This commit is contained in:
Henrik Lissner 2019-12-02 16:07:25 -05:00
parent 5ad4a018b1
commit 724bf9aa08
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -333,14 +333,15 @@ This value is cached. If REFRESH-P, then don't use the cached value."
(defmacro doom! (&rest modules)
"Bootstraps DOOM Emacs and its modules.
If the first item in MODULES doesn't satisfy `keywordp', MODULES is evaluated,
otherwise, MODULES is a multiple-property list (a plist where each key can have
multiple, linear values).
The bootstrap process involves making sure the essential directories exist, core
packages are installed, `doom-autoload-file' is loaded, `doom-packages-file'
cache exists (and is loaded) and, finally, loads your private init.el (which
should contain your `doom!' block).
If the cache exists, much of this function isn't run, which substantially
reduces startup time.
The overall load order of Doom is as follows:
~/.emacs.d/init.el
@ -359,9 +360,10 @@ The overall load order of Doom is as follows:
Module load order is determined by your `doom!' block. See `doom-modules-dirs'
for a list of all recognized module trees. Order defines precedence (from most
to least)."
`(let ((modules ',modules))
(unless (keywordp (car modules))
(setq modules (eval modules t)))
`(let ((modules
,@(if (keywordp (car modules))
(list (list 'quote modules))
modules)))
(unless doom-modules
(setq doom-modules
(make-hash-table :test 'equal