 (defun doom--module-pairs ()
   "Returns `doom-modules' as a list of (MODULE . SUBMODULE) cons cells. The list
 is sorted by order of insertion."
-  (let (pairs)
-    (maphash (lambda (key value)
-               (setq pairs (append pairs (list (cons (car key) (cdr key))))))
+  (let ((pairs '(nil)))
+    (maphash (lambda (key value) (nconc pairs (list (cons (car key) (cdr key)))))
              doom-modules)
-    pairs))
+    (cdr pairs)))
 
 (defun doom--module-paths (&optional append-file)
   "Returns a list of absolute file paths to modules, with APPEND-FILE added, if

    (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

        (error "Autoloads file couldn't be generated")))))

(defun doom-initialize-packages (&optional force-p load-p)
  "Crawls across your emacs.d in order to fill `doom-modules' (from init.el) and
`doom-packages' (from packages.el files), if they aren't set already. If FORCE-P
is non-nil, do it even if they are. Also aggressively loads all core autoload
files."
  (doom-initialize force-p)
  (let ((noninteractive t)
        (load-fn
