Error if autoloads are missing interactively

Trying to regenerate them greatly complicates doom-initialize's
potential use-cases. Keep it simple stupid!
This commit is contained in:
Henrik Lissner 2018-06-10 20:57:14 +02:00
parent 19deb4b926
commit f02156286b
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -242,9 +242,6 @@ it exists."
;; Bootstrap API
;;
(autoload 'doom//reload-doom-autoloads "autoload/modules" nil t)
(autoload 'doom//reload-package-autoloads "autoload/modules" nil t)
(defun doom-initialize (&optional force-p)
"Bootstrap Doom, if it hasn't already (or if FORCE-P is non-nil).
@ -287,14 +284,14 @@ to least)."
;; Regenerate `doom-autoload-file', which tells Doom where to find all its
;; module autoloaded functions.
(unless (or force-p noninteractive)
(doom//reload-doom-autoloads)))
(user-error "Your doom autoloads are missing! Run `bin/doom refresh' to regenerate them")))
;; Loads `doom-package-autoload-file', which caches `load-path',
;; `auto-mode-alist', `Info-directory-list', `doom-disabled-packages' and
;; `package-activated-list'. A big reduction in startup time.
(unless (or force-p
(doom-initialize-autoloads doom-package-autoload-file)
noninteractive)
(doom//reload-package-autoloads)))
(user-error "Your package autoloads are missing! Run `bin/doom refresh' to regenerate them")))
;; Initialize Doom core
(unless noninteractive
(add-hook! 'emacs-startup-hook