mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Remove :when support from after!; add defer-until!
New macro does what the :when keyword did for after!.
This commit is contained in:
@ -30,13 +30,13 @@ these properties:
|
||||
If non-nil, don't expand any template for this file and don't test any other
|
||||
file template rule against this buffer."
|
||||
(declare (indent defun))
|
||||
(after! (:when (boundp '+file-templates-alist))
|
||||
(defer-until! (boundp '+file-templates-alist)
|
||||
(+file-templates--set pred plist)))
|
||||
|
||||
;;;###autodef
|
||||
(defun set-file-templates! (&rest templates)
|
||||
"Like `set-file-templates!', but register many file templates at once."
|
||||
(after! (:when (boundp '+file-templates-alist))
|
||||
(defer-until! (boundp '+file-templates-alist)
|
||||
(dolist (template templates)
|
||||
(+file-templates--set (car template) (cdr template)))))
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
DOCSET (a string).
|
||||
|
||||
See `devdocs-alist' for the defaults. "
|
||||
(after! (:when (boundp 'devdocs-alist))
|
||||
(defer-until! (boundp 'devdocs-alist)
|
||||
(dolist (mode (doom-enlist modes))
|
||||
(setf (alist-get mode devdocs-alist) docset))))
|
||||
|
||||
|
Reference in New Issue
Block a user