From 5a50d6a5d6ccb96e75ddf2be317ecb159186575a Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 3 May 2021 15:39:01 -0700 Subject: override *CONSFIG* for all calls to MAKE-PROPSPEC within DEFPROPSPEC Signed-off-by: Sean Whitton --- src/property.lisp | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/property.lisp b/src/property.lisp index 28687c0..0a5768e 100644 --- a/src/property.lisp +++ b/src/property.lisp @@ -190,6 +190,11 @@ see MAP-PROPSPEC-PROPAPPS for how they are used.") (when indent (setf (get sym 'indent) indent))))) +(defmacro with-*host*-*consfig* (&body forms) + `(progv `(,(intern "*CONSFIG*")) + `(,(propspec-systems (host-propspec *host*))) + ,@forms)) + (defmacro define-dotted-property-macro (name args &aux (whole (gensym))) "Affix a period to the end of NAME and define a macro expanding into a propapp calling the original NAME after applying the dotted propapp rules, @@ -279,9 +284,9 @@ parsing FORMSV and pushing SETPROP keyword argument pairs to plist SLOTSV." (make-host :hostattrs (hostattrs *host*) :propspec - (make-propspec - :systems nil - :propspec (cons ',,name args))))))))))))))) + (with-*host*-*consfig* + (make-propspec + :propspec (cons ',,name args)))))))))))))))) (define-condition programmatic-apply-hostattrs (simple-warning) ()) @@ -374,12 +379,12 @@ You can usually use DEFPROPLIST instead of DEFPROPSPEC, which see." ,@(cdr (pop forms)))))) (setf (getf slots :hostattrs) `(lambda (plist) - (let ((propspec (preprocess-propspec - (make-propspec - :systems (propspec-systems (host-propspec *host*)) - :propspec (destructuring-bind ,lambda - (getf plist :orig-args) - ,@forms))))) + (let ((propspec (with-*host*-*consfig* + (preprocess-propspec + (make-propspec + :propspec (destructuring-bind ,lambda + (getf plist :orig-args) + ,@forms)))))) (setf (getf plist :propspec) propspec) (propappattrs (eval-propspec propspec)))))) -- cgit v1.2.3