aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-03-01 11:59:58 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-03-01 14:47:27 -0700
commit8bcc29d72c41906f32353cd9df15c500bf7d89c8 (patch)
treee932696d85cb564cb594c825c39493d12197f5f8
parent589a8f050732b744e690e36f2a86c77674e1e746 (diff)
downloadconsfigurator-8bcc29d72c41906f32353cd9df15c500bf7d89c8.tar.gz
attempt to avoid redefinition warnings in consfigs
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--src/property.lisp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/property.lisp b/src/property.lisp
index 16803dd..5fbf3ff 100644
--- a/src/property.lisp
+++ b/src/property.lisp
@@ -42,13 +42,12 @@
(setf (get sym 'check) check))
(when apply
(setf (get sym 'apply) apply)
- (eval `(defun ,sym ()))
- (setf (symbol-function sym)
- (if check
+ (let ((f (if check
(lambda (&rest args)
(unless (apply check args)
(apply apply args)))
apply)))
+ (eval `(defun ,sym ,args ,f))))
(when unapply
(setf (get sym 'unapply) unapply))
(setf (get sym 'property) t)