From f02156286b17c168e07b539d82b83fc42d4ad53e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 10 Jun 2018 20:57:14 +0200 Subject: [PATCH] Error if autoloads are missing interactively Trying to regenerate them greatly complicates doom-initialize's potential use-cases. Keep it simple stupid! --- core/core-packages.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/core/core-packages.el b/core/core-packages.el index 8fb349c2f..989ea611c 100644 --- a/core/core-packages.el +++ b/core/core-packages.el @@ -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