aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-03-05 12:20:19 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-03-05 12:24:29 -0700
commit840b616c2d0d6eb7c81705a7cf8a0fc653b1bce2 (patch)
treed07eeacb6011dd6776c4396b7fc729f6456b86e6 /src
parent1a1ca9a7fa4c30b3fd2d8dc58ae2e20971a7dde4 (diff)
downloadconsfigurator-840b616c2d0d6eb7c81705a7cf8a0fc653b1bce2.tar.gz
always set property function cells, to keep other code simple
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src')
-rw-r--r--src/property.lisp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/property.lisp b/src/property.lisp
index 0f922fe..9dca7c8 100644
--- a/src/property.lisp
+++ b/src/property.lisp
@@ -40,14 +40,15 @@
(setf (get sym 'hostattrs) hostattrs))
(when check
(setf (get sym 'check) check))
- (when apply
- (setf (get sym 'apply) apply)
- (setf (fdefinition sym)
- (if check
- (lambda (&rest args)
- (unless (apply check args)
- (apply apply args)))
- apply)))
+ (if apply
+ (progn (setf (get sym 'apply) apply)
+ (setf (fdefinition sym)
+ (if check
+ (lambda (&rest args)
+ (unless (apply check args)
+ (apply apply args)))
+ apply)))
+ (setf (fdefinition sym) #'noop))
(when unapply
(setf (get sym 'unapply) unapply))
(setf (get sym 'property) t)