         ("melpa" . "http://melpa.org/packages/")
         ("org"   . "http://orgmode.org/elpa/"))
 
-      use-package-always-ensure t
       use-package-always-defer t
+      use-package-always-ensure nil
+      use-package-debug doom-debug-mode
       quelpa-checkout-melpa-p nil
       quelpa-update-melpa-p nil
+      quelpa-use-package-inhibit-loading-quelpa t
       quelpa-dir (expand-file-name "quelpa" doom-packages-dir))
 
 
 ;;
-;; Bootstrap
+;; Library
 ;;
-
-(autoload 'use-package "use-package")
 
 (defun doom-package-init (&optional force-p)
   "Initialize DOOM, its essential packages and package.el. This must be used on
 first run. If you byte compile core/core.el, this file is avoided to speed up
-startup."
+startup. Returns `load-path'."
   (when (or (not doom-init) force-p)
     (package-initialize)
-    (unless (file-exists-p package-user-dir)
+    (when (or (not (file-exists-p package-user-dir)) force-p)
       (package-refresh-contents))
     (unless (package-installed-p 'quelpa-use-package)
       (package-install 'quelpa-use-package t))
 
-    (require 'quelpa)
-    (require 'use-package)
-    (when doom-packages-auto-p
-      (setq use-package-always-ensure t)
-      (require 'quelpa-use-package)
-      (quelpa-use-package-activate-advice))
-
+    (require 'quelpa-use-package)
+    (setq use-package-always-ensure t)
+    (quelpa-use-package-activate-advice)
+
+    (add-to-list 'load-path doom-local-dir)
     (add-to-list 'load-path doom-modules-dir)
-    (add-to-list 'load-path doom-private-dir)
     (add-to-list 'load-path doom-core-dir)
 
     (setq doom-init t)))
 
 (defmacro package! (name &rest rest)
   "Declare a package. Wraps around `use-package', and takes the same arguments
-that it does."
+that it does. NOTE: Packages are deferred by default."
   (declare (indent defun))
   (add-to-list 'doom-packages name)
-  (unless doom-packages-auto-p
+  ;; If `use-package-always-ensure' is nil, then remove any possibility of an
+  ;; installation by package.el or quelpa.
+  (unless use-package-always-ensure
     (when (and (plist-member rest :ensure)
                (plist-get rest :ensure))
       (setq rest (plist-put rest :ensure nil)))

;;; core-packages.el

;; Emacs has always been opinionated about package management. Unfortunately, so
;; have I. I used to use Cask, but found it very unreliable, so the result is
;; this: a mini-package manager I've written by combining the functionality of
;; package.el, quelpa and use-package.
;;
;; Why all the trouble? Because I want to be able to call an
;; 'update-all-packages' function from a shell script and the like. I want to be
;; able to manage my Emacs' packages from the command line, because I have tools
;; in my dotfiles to help me auto-update everything with a one-liner.

(defvar doom-init nil
  "Whether doom's package system has been initialized or not. It may not be if


(defvar doom-modules nil
  "List of installed modules.")

(defvar doom--load-path load-path
  "A backup of `load-path' before it was initialized.")
