   doom -p ~/.config/doom quickstart
 
 This command will refuse to overwrite the private directory if it already
-exists."
-  (doom//quickstart))
-
-(def-dispatcher! (install i)
-  "Installs requested plugins that aren't installed."
-  (doom//reload-doom-autoloads)
-  (when (doom//packages-install doom-auto-accept)
-    (doom//reload-package-autoloads)))
-
-(def-dispatcher! (update u)
-  "Checks for and updates outdated plugins."
-  (doom//reload-doom-autoloads)
-  (when (doom//packages-update doom-auto-accept)
-    (doom//reload-package-autoloads)))
-
-(def-dispatcher! (autoremove r)
-  "Removes orphaned plugins."
-  (doom//reload-doom-autoloads)
-  (when (doom//packages-autoremove doom-auto-accept)
-    (doom//reload-package-autoloads)))
-
-(def-dispatcher! (autoloads a)
+exists.")
+
+(dispatcher! (install i) (doom--do 'doom-packages-install)
+  "Installs requested plugins that aren't installed.")
+
+(dispatcher! (update u) (doom--do 'doom-packages-update)
+  "Installs requested plugins that aren't installed.")
+
+(dispatcher! (autoremove r) (doom--do 'doom-packages-autoremove)
+  "Installs requested plugins that aren't installed.")
+
+(dispatcher! (autoloads a) (doom-reload-autoloads nil 'force)
   "Regenerates Doom's autoloads file.
 
 This file tells Emacs where to find your module's autoloaded functions and
-plugins."
-  (doom//reload-autoloads nil 'force))
-
-(def-dispatcher! (upgrade up)
-  "Checks out the latest Doom on this branch."
-  (doom//upgrade))
-
-(def-dispatcher! (compile c)
+plugins.")
+
+
+(dispatcher! (upgrade up) (doom-upgrade)
+  "Checks out the latest Doom on this branch.")
+
+(dispatcher! (compile c) (doom-byte-compile args)
   "Byte-compiles your config or selected modules.
 
   compile [TARGETS...]

  1. Modify your `doom!' block,
  2. Add or remove `package!' blocks to your config,
  3. Add or remove autoloaded functions in module autoloaded files.
  4. Update Doom outside of Doom (e.g. with git)"
  (doom//refresh))


;;

    (delete-file file)
    (ignore-errors (delete-file (byte-compile-dest-file file)))
    (message "Deleted old %s" (file-name-nondirectory file))))

(defun doom--do (fn)
  (doom-reload-doom-autoloads)
  (when (funcall fn doom-auto-accept)
    (doom-reload-package-autoloads)))

(defun doom--server-load (file)
  (require 'server)
