Detect init.el in any module, instead of private user module

User module (named after user-login-name) is no longer automatically
loaded or detected, and must be explicitly mentioned in the doom! macro
of your emacs init.el file.

Also, any module can now have an init.el file, which will be run before
any modules are loaded.
This commit is contained in:
Henrik Lissner 2017-12-08 22:58:52 -05:00
parent df93fd8ce4
commit 346d7bdf36
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -308,16 +308,15 @@ include all modules, enabled or otherwise."
MODULES is an malformed plist of modules to load." MODULES is an malformed plist of modules to load."
(doom-initialize-modules modules) (doom-initialize-modules modules)
(when (and user-login-name
(not (doom-module-loaded-p :private (intern user-login-name))))
(doom-module-enable :private user-login-name))
`(let (file-name-handler-alist) `(let (file-name-handler-alist)
(setq doom-modules ',doom-modules) (setq doom-modules ',doom-modules)
(unless noninteractive (unless noninteractive
(load ,(doom-module-path :private user-login-name "init") t t)
,@(cl-loop for (module . submodule) in (doom-module-pairs) ,@(cl-loop for (module . submodule) in (doom-module-pairs)
collect `(require! ,module ,submodule nil t)) for module-path = (doom-module-path module submodule)
collect `(load! init ,module-path t) into inits
collect `(require! ,module ,submodule nil t) into configs
finally return (append inits configs))
(when (display-graphic-p) (when (display-graphic-p)
(require 'server) (require 'server)