 (defmacro @doom (&rest modules)
   "DOOM Emacs bootstrap macro. List the modules to load. Benefits from
 byte-compilation."
-  (doom--enable-modules modules)
+  (doom-initialize-modules modules)
   (unless noninteractive
     `(let (file-name-handler-alist)
        (setq doom-modules ',doom-modules)
 
-       ,@(mapcar (lambda (pkg)
-                   `(@require ,(car pkg) ,(cdr pkg) t))
+       ,@(mapcar (lambda (module) `(@require ,(car module) ,(cdr module) t))
                  (doom--module-pairs))
 
        (when (display-graphic-p)


Used by `@require' and `@depends-on'."
  (unless (or force-p (doom-module-loaded-p module submodule))
    (let ((sublist (assq module doom-modules)))
      (if sublist
          (setcdr (last sublist) (list submodule))
        (push (list module submodule) doom-modules)))))

(defun doom--enable-modules (modules)
  "Adds MODULES to `doom-modules'.

MODULES must be in mplist format:
  '(:feature evil :lang emacs-lisp javascript java)"
  (let (mode)
    (dolist (m modules)
      (cond ((keywordp m)
             (setq mode m))
            ((not mode)
             (error "No namespace specified on `@doom' for %s" m))
            ((eq m '*)
             (let ((mode-str (substring (symbol-name mode) 1)))
               (doom--enable-modules
                (cons mode
                      (--map (intern (f-base it))
                             (f-directories
                              (f-expand mode-str doom-modules-dir)))))))
            (t
             (doom--enable-module mode m))))
    doom-modules))


;;

`doom-initialize' sets this.")

(defvar doom-modules nil
  "A hash table of enabled modules.")

(defvar doom-packages nil
  "A list of enabled packages. Each element is a sublist, whose CAR is the
