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 (in4bf4978
). Ref:4bf49785fd
This commit is contained in:
parent
1abcf913aa
commit
057e6c531c
28 changed files with 41 additions and 46 deletions
|
@ -160,7 +160,7 @@ See `doom-real-buffer-p' for details on what that means."
|
|||
"Return a list of buffers whose `major-mode' is `eq' to MODE(S).
|
||||
|
||||
If DERIVED-P, test with `derived-mode-p', otherwise use `eq'."
|
||||
(let ((modes (doom-enlist modes)))
|
||||
(let ((modes (ensure-list modes)))
|
||||
(cl-remove-if-not (if derived-p
|
||||
(lambda (buf)
|
||||
(apply #'provided-mode-derived-p
|
||||
|
|
|
@ -101,7 +101,7 @@ The search recurses up to DEPTH and no further. DEPTH is an integer.
|
|||
|
||||
MATCH is a string regexp. Only entries that match it will be included."
|
||||
(let (result)
|
||||
(dolist (file (mapcan (doom-rpartial #'doom-glob "*") (doom-enlist paths)))
|
||||
(dolist (file (mapcan (doom-rpartial #'doom-glob "*") (ensure-list paths)))
|
||||
(cond ((file-directory-p file)
|
||||
(appendq!
|
||||
result
|
||||
|
|
|
@ -111,7 +111,7 @@ selection of all minor-modes, active or not."
|
|||
"TODO"
|
||||
(require 'org)
|
||||
(let* ((default-directory doom-docs-dir)
|
||||
(org-agenda-files (mapcar #'expand-file-name (doom-enlist files)))
|
||||
(org-agenda-files (mapcar #'expand-file-name (ensure-list files)))
|
||||
(depth (if (integerp depth) depth))
|
||||
(mindepth (if (integerp mindepth) mindepth))
|
||||
(org-inhibit-startup t))
|
||||
|
|
|
@ -316,7 +316,7 @@ editorconfig or dtrt-indent installed."
|
|||
(editorconfig-set-indentation nil width)))
|
||||
((require 'dtrt-indent nil t)
|
||||
(when-let (vars (nth 2 (assq major-mode dtrt-indent-hook-mapping-list)))
|
||||
(dolist (var (doom-enlist vars))
|
||||
(dolist (var (ensure-list vars))
|
||||
(doom-log "Updated %s = %d" var width)
|
||||
(set var width)))))
|
||||
(message "Changed indentation to %d" width))
|
||||
|
|
|
@ -28,7 +28,7 @@ all themes. It will apply to all themes once they are loaded."
|
|||
`(progn
|
||||
(defun ,fn ()
|
||||
(let (custom--inhibit-theme-enable)
|
||||
(dolist (theme (doom-enlist (or ,theme 'user)))
|
||||
(dolist (theme (ensure-list (or ,theme 'user)))
|
||||
(when (or (eq theme 'user)
|
||||
(custom-theme-enabled-p theme))
|
||||
(apply #'custom-theme-set-faces theme
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue