Simplify core loading process (part 2)
This commit is contained in:
parent
65748c5809
commit
6e8726a624
2 changed files with 9 additions and 7 deletions
|
@ -26,7 +26,8 @@ If neither is available, run all tests in all enabled modules."
|
||||||
(condition-case-unless-debug ex
|
(condition-case-unless-debug ex
|
||||||
(let (targets)
|
(let (targets)
|
||||||
;; ensure DOOM is initialized
|
;; ensure DOOM is initialized
|
||||||
(load (expand-file-name "core/core.el" user-emacs-directory) nil t)
|
(let (noninteractive)
|
||||||
|
(load (expand-file-name "core/core.el" user-emacs-directory) nil t))
|
||||||
;; collect targets
|
;; collect targets
|
||||||
(cond ((and command-line-args-left
|
(cond ((and command-line-args-left
|
||||||
(equal (car command-line-args-left) "--"))
|
(equal (car command-line-args-left) "--"))
|
||||||
|
|
|
@ -149,7 +149,7 @@ ability to invoke the debugger in debug mode."
|
||||||
nil)
|
nil)
|
||||||
|
|
||||||
(defun doom|finalize ()
|
(defun doom|finalize ()
|
||||||
(unless doom-init-p
|
(unless (or doom-init-p noninteractive)
|
||||||
(dolist (hook '(doom-init-hook doom-post-init-hook))
|
(dolist (hook '(doom-init-hook doom-post-init-hook))
|
||||||
(run-hook-wrapped hook #'doom-try-run-hook hook))
|
(run-hook-wrapped hook #'doom-try-run-hook hook))
|
||||||
(setq doom-init-p t))
|
(setq doom-init-p t))
|
||||||
|
@ -187,11 +187,12 @@ ability to invoke the debugger in debug mode."
|
||||||
"%s in autoloads.el -> %s"
|
"%s in autoloads.el -> %s"
|
||||||
(car ex) (error-message-string ex))))
|
(car ex) (error-message-string ex))))
|
||||||
|
|
||||||
|
(unless noninteractive
|
||||||
(load! core-ui) ; draw me like one of your French editors
|
(load! core-ui) ; draw me like one of your French editors
|
||||||
(load! core-popups) ; taming sudden yet inevitable windows
|
(load! core-popups) ; taming sudden yet inevitable windows
|
||||||
(load! core-editor) ; baseline configuration for text editing
|
(load! core-editor) ; baseline configuration for text editing
|
||||||
(load! core-projects) ; making Emacs project-aware
|
(load! core-projects) ; making Emacs project-aware
|
||||||
(load! core-keybinds)) ; centralized keybind system + which-key
|
(load! core-keybinds))) ; centralized keybind system + which-key
|
||||||
|
|
||||||
(add-hook! '(emacs-startup-hook doom-reload-hook)
|
(add-hook! '(emacs-startup-hook doom-reload-hook)
|
||||||
#'doom|finalize)
|
#'doom|finalize)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue