chiark
/
gitweb
/
~mdw
/
sod
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
doc/syntax.tex: Delete (wrong) duplicate rule for <argument-declarator>.
[sod]
/
src
/
pset-proto.lisp
diff --git
a/src/pset-proto.lisp
b/src/pset-proto.lisp
index e16e04c39c5a1f01a6b85ef11caf26de0442eb48..61793b5c5b5359e627be620265387431b212bd4d 100644
(file)
--- a/
src/pset-proto.lisp
+++ b/
src/pset-proto.lisp
@@
-317,7
+317,8
@@
(defmacro default-slot-from-property
We initialize SLOT in INSTANCE. In full: if PSET contains a property
called NAME, then convert it to TYPE, bind the value to PVAR and evaluate
CONVERT-FORMS -- these default to just using the property value. If
We initialize SLOT in INSTANCE. In full: if PSET contains a property
called NAME, then convert it to TYPE, bind the value to PVAR and evaluate
CONVERT-FORMS -- these default to just using the property value. If
- there's no property, and the slot is named in SLOT-NAMES and currently
+ there's no property, and DEFAULT-FORMS contains at least one non-
+ declaration form, and the slot is named in SLOT-NAMES and currently
unbound, then evaluate DEFAULT-FORMS and use their value to compute the
slot value."
unbound, then evaluate DEFAULT-FORMS and use their value to compute the
slot value."
@@
-333,7
+334,8
@@
(defmacro default-slot-from-property
(setf (slot-value ,instance ,slot)
(with-default-error-location (,floc)
,@(or convert-forms `(,pvar))))
(setf (slot-value ,instance ,slot)
(with-default-error-location (,floc)
,@(or convert-forms `(,pvar))))
- (default-slot (,instance ,slot ,slot-names)
- ,@body)))))))
+ ,@(and body
+ `((default-slot (,instance ,slot ,slot-names)
+ ,@body)))))))))
;;;----- That's all, folks --------------------------------------------------
;;;----- That's all, folks --------------------------------------------------