From 04d14bcba933b5f44d0921d3b23fb413dfb16b6e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 2 Feb 2020 16:03:34 -0500 Subject: [PATCH] Minor refactors & comment correction --- core/autoload/packages.el | 11 +++++++---- docs/api.org | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/core/autoload/packages.el b/core/autoload/packages.el index 57a182e69..0a6b581b8 100644 --- a/core/autoload/packages.el +++ b/core/autoload/packages.el @@ -210,12 +210,12 @@ ones." "Return an alist mapping package names (strings) to pinned commits (strings)." (let (alist) (dolist (package doom-packages alist) - (cl-destructuring-bind (_ &key disable ignore pin unpin &allow-other-keys) + (cl-destructuring-bind (name &key disable ignore pin unpin &allow-other-keys) package (when (and (not ignore) (not disable) (or pin unpin)) - (setf (alist-get (doom-package-recipe-repo (car package)) alist + (setf (alist-get (doom-package-recipe-repo name) alist nil 'remove #'equal) (unless unpin pin))))))) @@ -240,8 +240,11 @@ ones." "Return straight recipes for non-builtin packages with a local-repo." (let (recipes) (dolist (recipe (hash-table-values straight--recipe-cache)) - (with-plist! recipe (local-repo type) - (when (and local-repo (not (eq type 'built-in))) + (cl-destructuring-bind (&key local-repo type no-build &allow-other-keys) + recipe + (unless (or (null local-repo) + (eq type 'built-in) + no-build) (push recipe recipes)))) (nreverse recipes))) diff --git a/docs/api.org b/docs/api.org index dc9f3d2a5..749141a5a 100644 --- a/docs/api.org +++ b/docs/api.org @@ -388,7 +388,7 @@ These are side-by-side comparisons, showing how to bind keys with and without *** package! #+BEGIN_SRC elisp :eval no ;; To install a package that can be found on ELPA or any of the sources -;; specified in `doom-core-package-sources': +;; specified in `straight-recipe-repositories': (package! evil) (package! js2-mode) (package! rainbow-delimiters)