 ;;
 
 (defmacro @package (name &rest plist)
-  "Declares a package. This does not load nor install them explicitly.
-
-this macro serves a purely declarative purpose, and are run to build
+  "Declares a package and how to install it (if applicable). This does not load
+nor install them.
+
+Accepts the following properties:
+
+ :recipe RECIPE        Takes a MELPA-style recipe (see `quelpa-recipe' in
+                       `quelpa' for an example); for packages to be installed
+                       from external sources.
+ :pin ARCHIVE-NAME     Instructs ELPA to only look for this package in
+                       ARCHIVE-NAME. e.g. \"org\". Ignored if RECIPE is present.
+
+This macro serves a purely declarative purpose, and are used to fill
 `doom-packages', so that functions like `doom/packages-install' can operate on
-them.
-
-Accepts the following properties:
-
- :recipe RECIPE        Takes a MELPA-style recipe (see `quelpa-recipe' for an
-                       example); for packages to be installed from external
-                       sources.
- :pin ARCHIVE-NAME     Instructs ELPA to only look for this package in
-                       ARCHIVE-NAME. e.g. \"org\"."
+them. "
   (declare (indent defun))
   (let ((pkg-recipe (plist-get plist :recipe))
         (pkg-pin    (plist-get plist :pin)))
     (when (= 0 (mod (length pkg-recipe) 2))
       (plist-put plist :recipe (cons name pkg-recipe)))
+    (when (and pkg-recipe pkg-pin)
+      (plist-put plist :pkg-pin nil))
     `(add-to-list 'doom-packages ',(cons name plist) t)))
 
 (defmacro @depends-on (module submodule)


(defun doom/reload-autoloads ()
  "Refreshes the autoloads.el file, which tells Emacs where to find all the
autoloaded functions in the modules you use or among the core libraries, e.g.
core/autoload/*.el.

In modules, checks modules/*/autoload.el and modules/*/autoload/*.el.

          (list doom-cache-dir package-user-dir))

    (package-initialize t)
    ;; Sure, `package-initialize' could fill `load-path', but package activation
    ;; costs precious milliseconds, and my premature optimization quota isn't
    ;; filled yet. UNACCEPTAABBLLLE!
    ;;
    ;; Also, in some edge cases involving package initialization during a
    ;; non-interactive session, `package-initialize' fails to fill `load-path'.
    (setq load-path (append load-path (directory-files package-user-dir t "^[a-zA-Z0-9]" t)))

    ;; Ensure core packages are installed
