From b954ae483d0d00e04ae94d33dd6e8d209b8f1e09 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 29 Sep 2021 17:21:31 -0500 Subject: Add :load-after setup form --- lisp/acdw-setup.el | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lisp') diff --git a/lisp/acdw-setup.el b/lisp/acdw-setup.el index e271faa..eb4d12b 100644 --- a/lisp/acdw-setup.el +++ b/lisp/acdw-setup.el @@ -87,5 +87,16 @@ package. This macro is not repeatable." (let ((recipe (cadr sexp))) (if (consp recipe) (car recipe) recipe)))) +;; https://www.emacswiki.org/emacs/SetupEl +(setup-define :load-after + (lambda (&rest features) + (let ((body `(require ',(setup-get 'feature)))) + (dolist (feature (if (listp features) + (nreverse features) + (list features))) + (setq body `(with-eval-after-load ',feature ,body))) + body)) + :documentation "Load the current feature after FEATURES.") + (provide 'acdw-setup) ;;; acdw-setup.el ends here -- cgit 1.4.1-21-gabe81