aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/package.lisp1
-rw-r--r--src/propspec.lisp6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/package.lisp b/src/package.lisp
index b84c34d..80f8849 100644
--- a/src/package.lisp
+++ b/src/package.lisp
@@ -107,6 +107,7 @@
#:append-propspecs
#:seqprops
#:eseqprops
+ #:with-requirements
#:silent-seqprops
#:unapply
#:on-change
diff --git a/src/propspec.lisp b/src/propspec.lisp
index 0a93e8e..f295081 100644
--- a/src/propspec.lisp
+++ b/src/propspec.lisp
@@ -288,6 +288,12 @@ application specification expression to a property application specification."
(invoke-restart 'skip-property))))
(apply-and-print propapps)))))
+(defmacro with-requirements (propapp &body requirements)
+ "Apply PROPAPP only after applying each dependency in REQUIREMENTS.
+Each item in REQUIREMENTS implicitly depends on the one preceding it, i.e., we
+apply the elements of REQUIREMENTS in reverse order."
+ `(eseqprops ,@(reverse requirements) ,propapp))
+
(define-function-property-combinator silent-seqprops (&rest propapps)
(retprop :type (collapse-types (mapcar #'propapptype propapps))
:check (constantly nil)