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) (defmacro doom! (&rest modules)
"Bootstraps DOOM Emacs and its 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 The bootstrap process involves making sure the essential directories exist, core
packages are installed, `doom-autoload-file' is loaded, `doom-packages-file' packages are installed, `doom-autoload-file' is loaded, `doom-packages-file'
cache exists (and is loaded) and, finally, loads your private init.el (which cache exists (and is loaded) and, finally, loads your private init.el (which
should contain your `doom!' block). 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: The overall load order of Doom is as follows:
~/.emacs.d/init.el ~/.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' 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 for a list of all recognized module trees. Order defines precedence (from most
to least)." to least)."
`(let ((modules ',modules)) `(let ((modules
(unless (keywordp (car modules)) ,@(if (keywordp (car modules))
(setq modules (eval modules t))) (list (list 'quote modules))
modules)))
(unless doom-modules (unless doom-modules
(setq doom-modules (setq doom-modules
(make-hash-table :test 'equal (make-hash-table :test 'equal