          ,@(nreverse load-forms))
        ,(unless doom--initializing
           '(unless noninteractive
+             (doom--refresh-cache)
              (doom-initialize-modules))))))
 
 (defmacro def-package! (name &rest plist)


(defun doom--refresh-cache ()
  "TODO"
  (doom-initialize-packages 'internal)
  (unless noninteractive
    (with-temp-buffer
      (prin1 `(setq load-path ',load-path
                    Info-directory-list ',Info-directory-list
                    doom-disabled-packages ',doom-disabled-packages)
             (current-buffer))
      (write-file doom-packages-file))))

(defun doom-initialize (&optional force-p)
  "Bootstrap the bare essentials to get Doom running, if it hasn't already. If

(defvar doom-packages-file (concat doom-local-dir "packages.el")
  "Where to cache `load-path' and `Info-directory-list'.")

(defvar doom--current-module nil)
(defvar doom--init-cache-p nil)
(defvar doom--initializing nil)
(defvar doom--refreshed-p nil)
(defvar generated-autoload-load-name)

(setq autoload-compute-prefixes nil
