From 674ad9837d9d334153aa2580a455eca1d4190291 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 22 Dec 2018 03:55:32 -0500 Subject: [PATCH] Update after! docstring --- core/core-lib.el | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/core/core-lib.el b/core/core-lib.el index 88f89a3da..86bf7cf60 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -163,8 +163,32 @@ serve as a predicated alternative to `after!'." (advice-remove #',mode #',advice-fn)))))) (defmacro after! (targets &rest body) - "A smart wrapper around `with-eval-after-load'. Supresses warnings during -compilation. This will no-op on features that have been disabled by the user." + "A smart wrapper around `with-eval-after-load' that: + +1. Suppresses warnings at compile-time +2. No-ops for TARGETS that are disabled by the user (via `package!') +3. Supports compound TARGETS statements (see below) + +BODY is evaluated once TARGETS are loaded. TARGETS can either be: + +- An unquoted package symbol (the name of a package) + + (after! helm ...) + +- An unquoted list of package symbols + + (after! (magit git-gutter) ...) + +- An unquoted, nested list of compound package lists, using :or/:any and/or :and/:all + + (after! (:or package-a package-b ...) ...) + (after! (:and package-a package-b ...) ...) + (after! (:and package-a (:or package-b package-c) ...) ...) + + Note that: + - :or and :any are equivalent + - :and and :all are equivalent + - If these are omitted, :and is assumed." (declare (indent defun) (debug t)) (unless (and (symbolp targets) (memq targets (bound-and-true-p doom-disabled-packages)))