diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-10-29 15:11:24 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-11-01 11:58:22 -0700 |
commit | df0e39f596cbdc388f86fe707e32480544377d2c (patch) | |
tree | e06bb94d2643b089da2cb1dd018822ef7c0ef483 /src/combinator.lisp | |
parent | c1c330e4a5a48b75ffdd7c5630e03e9ebde0ab13 (diff) | |
download | consfigurator-df0e39f596cbdc388f86fe707e32480544377d2c.tar.gz |
ON{-APPLY,}-CHANGE: always return result of primary propapp
In particular, if the secondary propapps are applied but make no change, do
not return :NO-CHANGE as the overall result.
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/combinator.lisp')
-rw-r--r-- | src/combinator.lisp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/combinator.lisp b/src/combinator.lisp index 772ac6c..26a6767 100644 --- a/src/combinator.lisp +++ b/src/combinator.lisp @@ -286,14 +286,13 @@ in order." (apply #'propattrs prop args) (propappattrs on-change)) :apply (lambda (&rest args) - (if (eql :no-change (apply #'propapply prop args)) - :no-change - (propappapply on-change))) + (aprog1 (apply #'propapply prop args) + (unless (eql it :no-change) + (propappapply on-change)))) :unapply (lambda (&rest args) - (let ((result (apply #'propunapply prop args))) - (cond ((eql :no-change result) :no-change) - (unapply (propappapply on-change)) - (t result)))) + (aprog1 (apply #'propunapply prop args) + (when (and unapply (not (eql it :no-change))) + (propappapply on-change)))) :args (cdr propapp)))) (defmacro as (user &body properties) |