   "A backup of `load-path' before it was altered by `doom-initialize'. Used as a
 base by `doom!' and for calculating how many packages exist.")
 
-(defvar doom--module nil)
 (defvar doom--refresh-p nil)
 
 (setq load-prefer-newer (or noninteractive doom-debug-mode)

  "A convenience macro wrapper for `doom-module-loaded-p'. It is evaluated at
compile-time/macro-expansion time."
  (unless submodule
    (unless doom--module
      (error "featurep! was used incorrectly (doom--module wasn't unset)"))
    (setq flag module
          module (car doom--module)
          submodule (cdr doom--module)))
  (if flag
      (and (memq flag (doom-module-flags module submodule)) t)
    (doom-module-loaded-p module submodule)))

      (funcall load-fn (expand-file-name "packages.el" doom-core-dir))
      (cl-loop for (module . submodule) in (doom--module-pairs)
               for path = (doom-module-path module submodule "packages.el")
               do (funcall load-fn path t)))))

(defun doom-initialize-modules (modules)
  "Adds MODULES to `doom-modules'. MODULES must be in mplist format.
