Remove :when support from after!; add defer-until!

New macro does what the :when keyword did for after!.
This commit is contained in:
Henrik Lissner 2018-06-27 21:29:28 +02:00
parent e9ccc09fe4
commit 5a7c8803d9
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 21 additions and 18 deletions

View file

@ -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)))))