Refactor doom init process

- Refactors doom-initialize
- Moves doom-initialize-modules call to init.el, to more easily isolate
  it during unit testing.
This commit is contained in:
Henrik Lissner 2019-08-23 20:33:30 -04:00
parent 465122320d
commit 8ac1e1a781
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
7 changed files with 53 additions and 48 deletions

13
init.el
View file

@ -45,5 +45,16 @@
;; to skip the mtime checks on every *.elc file we load.
(setq load-prefer-newer noninteractive)
;; Let 'er rip!
;; Load the heart of Doom Emacs
(require 'core (concat user-emacs-directory "core/core"))
;; And let 'er rip!
(unless noninteractive
(add-hook 'window-setup-hook #'doom-display-benchmark-h)
(when (cdr command-line-args)
(add-to-list 'command-switch-alist
(cons "--restore" #'doom-restore-session-handler))))
(doom-initialize)
(doom-initialize-core)
(doom-initialize-modules)