💥 Redesign private sub-module system

~/.doom.d/modules is now a full module tree, like ~/.emacs.d/modules.
Symlinks are no longer involved.

Private modules can now shadow Doom modules. e.g.
~/.doom.d/modules/lang/org will take precendence over
~/.emacs.d/modules/lang/org.

Also, made doom--*-load-path variables public (e.g. doom--site-load-path
=> doom-site-load-path), and rearranged the load-path for a 10-15%
startup boost.
This commit is contained in:
Henrik Lissner 2018-02-16 02:02:58 -05:00
parent 8ca4fbd8fe
commit 2b1c323dbf
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
12 changed files with 122 additions and 145 deletions

View file

@ -84,9 +84,13 @@ interactive session."
(defmacro warn! (message &rest args)
"Output a colored warning for the current module in the *Messages* buffer."
(let ((load-file-name (or load-file-name byte-compile-current-file)))
(if (file-in-directory-p load-file-name doom-modules-dir)
`(cl-destructuring-bind (cat . mod) (doom-module-from-path ,load-file-name)
(delay-warning (format "%s %s" cat mod) (format ,message ,@args) :warning))
(if (cl-loop for dir in doom-modules-dirs
if (file-in-directory-p load-file-name dir)
return t)
`(cl-destructuring-bind (cat . mod)
(doom-module-from-path ,load-file-name)
(delay-warning (format "%s %s" cat mod) (format ,message ,@args)
:warning))
`(delay-warning (file-relative-name load-file-name doom-emacs-dir)
(format ,message ,@args) :warning))))