Refactor doom! (simplify)

This commit is contained in:
Henrik Lissner 2017-06-05 20:19:23 +02:00
parent 3d42291314
commit 341219f1bf
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -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))))))