Simplify core loading process

This commit is contained in:
Henrik Lissner 2017-08-08 14:25:36 +02:00
parent 7409890e78
commit 65748c5809
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 8 additions and 10 deletions

View file

@ -26,9 +26,7 @@ If neither is available, run all tests in all enabled modules."
(condition-case-unless-debug ex
(let (targets)
;; ensure DOOM is initialized
(let (noninteractive)
(load (expand-file-name "init.el" user-emacs-directory) nil t))
(remove-hook 'doom-init-hook #'doom--display-benchmark)
(load (expand-file-name "core/core.el" user-emacs-directory) nil t)
;; collect targets
(cond ((and command-line-args-left
(equal (car command-line-args-left) "--"))

View file

@ -312,12 +312,6 @@ MODULES is an malformed plist of modules to load."
(setq doom-modules ',doom-modules)
(unless noninteractive
(require 'core-ui) ; draw me like one of your French editors
(require 'core-popups) ; taming sudden yet inevitable windows
(require 'core-editor) ; baseline configuration for text editing
(require 'core-projects) ; making Emacs project-aware
(require 'core-keybinds) ; centralized keybind system + which-key
(load ,(doom-module-path :private user-login-name "init") t t)
,@(cl-loop for (module . submodule) in (doom--module-pairs)
collect `(require! ,module ,submodule t))

View file

@ -185,7 +185,13 @@ ability to invoke the debugger in debug mode."
('error
(lwarn 'doom-autoloads :warning
"%s in autoloads.el -> %s"
(car ex) (error-message-string ex)))))
(car ex) (error-message-string ex))))
(load! core-ui) ; draw me like one of your French editors
(load! core-popups) ; taming sudden yet inevitable windows
(load! core-editor) ; baseline configuration for text editing
(load! core-projects) ; making Emacs project-aware
(load! core-keybinds)) ; centralized keybind system + which-key
(add-hook! '(emacs-startup-hook doom-reload-hook)
#'doom|finalize)