Minor refactors & comment correction

This commit is contained in:
Henrik Lissner 2020-02-02 16:03:34 -05:00
parent 047ea8dab5
commit 04d14bcba9
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 8 additions and 5 deletions

View file

@ -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)))

View file

@ -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)