Remove :when support from after!; add defer-until!
New macro does what the :when keyword did for after!.
This commit is contained in:
parent
e9ccc09fe4
commit
5a7c8803d9
3 changed files with 21 additions and 18 deletions
|
@ -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)))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue