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

@ -42,7 +42,7 @@
'(((lambda (limit)
(let (case-fold-search)
(and (re-search-forward hl-todo-regexp limit t)
(memq 'font-lock-comment-face (doom-enlist (get-text-property (point) 'face))))))
(memq 'font-lock-comment-face (ensure-list (get-text-property (point) 'face))))))
(1 (hl-todo-get-face) t t))))
(when hl-todo-mode
(hl-todo-mode -1)

View file

@ -33,7 +33,7 @@ Pretty symbols can be unset for emacs-lisp-mode with:
(set-ligatures! 'emacs-lisp-mode nil)"
(declare (indent defun))
(if (null (car-safe plist))
(dolist (mode (doom-enlist modes))
(dolist (mode (ensure-list modes))
(delq! mode +ligatures-extra-alist 'assq))
(let (results)
(while plist
@ -42,7 +42,7 @@ Pretty symbols can be unset for emacs-lisp-mode with:
(prependq! results (pop plist))
(when-let (char (plist-get +ligatures-extra-symbols key))
(push (cons (pop plist) char) results)))))
(dolist (mode (doom-enlist modes))
(dolist (mode (ensure-list modes))
(setf (alist-get mode +ligatures-extra-alist)
(if-let (old-results (alist-get mode +ligatures-extra-alist))
(dolist (cell results old-results)

View file

@ -143,7 +143,7 @@ If DEFAULT is non-nil, apply to all future buffers. Modelines are defined with
"Set the modeline to NAME on HOOKS.
See `def-modeline!' on how modelines are defined."
(let ((fn (intern (format "+modeline-set-%s-format-h" name))))
(dolist (hook (doom-enlist hooks))
(dolist (hook (ensure-list hooks))
(when after-init-time
(dolist (name (mapcar #'car +modeline-format-alist))
(remove-hook hook (intern (format "+modeline-set-%s-format-h" name)))))