Add stale elc check to doctor
And short-circuit internal checks if Doom fails to load.
This commit is contained in:
parent
1136e9f49b
commit
6afc8e5563
1 changed files with 48 additions and 38 deletions
|
@ -286,6 +286,7 @@
|
|||
;; --- are your modules set up properly? ----------------------
|
||||
|
||||
(condition-case-unless-debug ex
|
||||
(progn
|
||||
(let ((inhibit-message t)
|
||||
(after-init-time (current-time))
|
||||
noninteractive)
|
||||
|
@ -294,15 +295,20 @@
|
|||
(require 'core-packages)
|
||||
(doom-initialize-packages)
|
||||
(success! "Attempt to load DOOM: success! Loaded v%s" doom-version))
|
||||
(error
|
||||
(warn! "Attempt to load DOOM: failed\n %s\n"
|
||||
(or (cdr-safe ex) (car ex)))
|
||||
(setq doom-modules nil)))
|
||||
|
||||
(section! "Checking Doom core for irregularities...")
|
||||
(let ((indent 4))
|
||||
(load (expand-file-name "doctor.el" doom-core-dir) nil 'nomessage))
|
||||
|
||||
(section! "Checking for stale elc files...")
|
||||
(let ((elc-files (doom-files-in (list doom-emacs-dir doom-private-dir)
|
||||
:match "\\.elc$"
|
||||
:depth 2)))
|
||||
(dolist (file elc-files)
|
||||
(when (file-newer-than-file-p (concat (file-name-sans-extension file) ".el")
|
||||
file)
|
||||
(warn! "%s is out-of-date" (abbreviate-file-name file)))))
|
||||
|
||||
(when (bound-and-true-p doom-modules)
|
||||
(section! "Checking your enabled modules...")
|
||||
(let ((indent 4))
|
||||
|
@ -327,7 +333,11 @@
|
|||
(load doctor-file 'noerror 'nomessage)))
|
||||
(file-missing (error! "%s" (error-message-string ex)))
|
||||
(error (error! "Syntax error: %s" ex)))))
|
||||
doom-modules)))
|
||||
doom-modules))))
|
||||
(error
|
||||
(warn! "Attempt to load DOOM: failed\n %s\n"
|
||||
(or (cdr-safe ex) (car ex)))
|
||||
(setq doom-modules nil)))
|
||||
|
||||
;;
|
||||
(message "\n")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue