                                              (and (f-directory-p auto-dir)
                                                   (f-glob "*.el" auto-dir))))
                                    (--map (doom-module-path (car it) (cdr it))
-                                          (doom-module-pairs))))
+                                          (doom--module-pairs))))
                   (f-glob "autoload/*.el" doom-core-dir)))
     (when (f-exists-p generated-autoload-file)
       (f-delete generated-autoload-file)

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

       (when (display-graphic-p)
         (require 'server)

    (setq doom-init-p t)))

(defun doom-initialize-autoloads (&optional force-p)
  "Ensures that `doom-autoload-file' exists and is loaded. If it doesn't, run
`doom/reload-autoloads' to generate it."
  (unless (ignore-errors (require 'autoloads doom-autoload-file t))
    (unless noninteractive
      (doom/reload-autoloads)
