Refactor doom! (simplify)
This commit is contained in:
parent
3d42291314
commit
341219f1bf
1 changed files with 2 additions and 5 deletions
|
@ -286,10 +286,7 @@ byte-compilation."
|
||||||
(setq doom-modules ',doom-modules)
|
(setq doom-modules ',doom-modules)
|
||||||
|
|
||||||
(unless noninteractive
|
(unless noninteractive
|
||||||
,(let ((private-init (doom-module-path :private user-login-name "init")))
|
(load ,(doom-module-path :private user-login-name "init") t t)
|
||||||
(when (file-exists-p (concat private-init ".el"))
|
|
||||||
`(load ,private-init t t)))
|
|
||||||
|
|
||||||
,@(let (forms)
|
,@(let (forms)
|
||||||
(dolist (module (doom--module-pairs))
|
(dolist (module (doom--module-pairs))
|
||||||
(push `(require! ,(car module) ,(cdr module) t) forms))
|
(push `(require! ,(car module) ,(cdr module) t) forms))
|
||||||
|
@ -351,7 +348,7 @@ throw an error if the file doesn't exist."
|
||||||
(error "Could not find %s" filesym))
|
(error "Could not find %s" filesym))
|
||||||
(let ((file (expand-file-name (concat (symbol-name filesym) ".el") path)))
|
(let ((file (expand-file-name (concat (symbol-name filesym) ".el") path)))
|
||||||
(if (file-exists-p file)
|
(if (file-exists-p file)
|
||||||
`(load ,(file-name-sans-extension file) ,noerror (not doom-debug-mode))
|
`(load ,(file-name-sans-extension file) ,noerror ,(not doom-debug-mode))
|
||||||
(unless noerror
|
(unless noerror
|
||||||
(error "Could not load! file %s" file))))))
|
(error "Could not load! file %s" file))))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue