refactor: replace doom-enlist with ensure-list

doom-enlist is now a deprecated alias for ensure-list, which is built
into Emacs 28.1+ and is its drop-in replacement. We've already
backported it for 27.x users in doom-lib (in 4bf4978).

Ref: 4bf49785fd
This commit is contained in:
Henrik Lissner 2022-08-07 12:24:14 +02:00
parent 1abcf913aa
commit 057e6c531c
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
28 changed files with 41 additions and 46 deletions

View file

@ -140,7 +140,7 @@ uses a straight or package.el command directly).")
(print! (start "Installing straight..."))
(print-group!
(cl-destructuring-bind (depth . options)
(doom-enlist straight-vc-git-default-clone-depth)
(ensure-list straight-vc-git-default-clone-depth)
(let ((branch-switch (if (memq 'single-branch options)
"--single-branch"
"--no-single-branch")))
@ -341,7 +341,7 @@ non-nil."
(defun doom-package-is-type-p (package type)
"TODO"
(memq type (doom-enlist (doom-package-get package :type))))
(memq type (ensure-list (doom-package-get package :type))))
(defun doom-package-in-module-p (package category &optional module)
"Return non-nil if PACKAGE was installed by the user's private config."
@ -585,7 +585,7 @@ should use it!"
(cl-loop for target in targets
if (or (keywordp target) (listp target))
append
(cl-loop with (category . modules) = (doom-enlist target)
(cl-loop with (category . modules) = (ensure-list target)
for (name . plist) in doom-packages
for pkg-modules = (plist-get plist :modules)
if (and (assq category pkg-modules)