- :key #'class-name)))))
-
-
- (flet ((do-set-slot()
-
- (let ((fn
- (let ((*bypass-property-layered-function* t))
- (if (slot-boundp-using-class class attribute property)
- (slot-value-using-class class attribute property)
- (setf (slot-value-using-class class attribute property)
- (property-layered-function
- (attribute-description attribute)
- (attribute-name attribute)
- (closer-mop:slot-definition-name property)))))))
- ;(dprint "We are setting the fn ~A " fn)
- (when (not (generic-function-methods fn))
- ; (dprint "... there are no methods on it ever")
- ;; * This slot has never been set before.
- ;; create a method on property-layered-function
- ;; so subclasses can see this new property.
- (ensure-layered-method
- (layered-function-definer 'property-layered-function)
- `(lambda (description attribute property)
- (declare (ignore description attribute property))
- ,fn)
- :in-layer layer
- :specializers
- (list (class-of
- (attribute-description attribute))
- (closer-mop:intern-eql-specializer
- (attribute-name attribute))
- (closer-mop:intern-eql-specializer
- (closer-mop:slot-definition-name property)))))
-
-
- ;; finally, specialize this property to this description.
- (ensure-layered-method
- fn
- `(lambda (description)
- (funcall ,(lambda()
- new-value)))
- :in-layer layer
- :specializers (list (class-of (attribute-description attribute)
- ))))))
-
- (if (slot-boundp attribute 'description-class)
- (do-set-slot)
- (error "serrint wif no desc WTF!")))))
-
+ :key #'class-name))))
+ (boundp (slot-boundp-using-class class attribute property))
+ (val (real-slot-value-using-class class attribute property)))
+
+ (when (special-symbol-p val)
+ (return-from slot-value-using-layer (call-next-method)))
+
+ (when (not boundp)
+ ;; * This slot has never been set before.
+ ;; create a method on property-layered-function
+ ;; so subclasses can see this new property.
+ (ensure-layered-method
+ (layered-function-definer 'property-layered-function)
+ `(lambda (description attribute property)
+ (declare (ignore description attribute property))
+ ,val)
+ :in-layer layer
+ :specializers
+ (list (class-of
+ (attribute-description attribute))
+ (closer-mop:intern-eql-specializer
+ (attribute-name attribute))
+ (closer-mop:intern-eql-specializer
+ (closer-mop:slot-definition-name property)))))
+
+ ;; specialize this property to this description.
+
+ (ensure-layered-method
+ val
+ `(lambda (description)
+ (funcall ,(lambda()
+ new-value)))
+ :in-layer layer
+ :specializers (list (class-of (attribute-description attribute))))
+
+ ;; and return the set value as is custom
+ (slot-value-using-class class attribute property)))
+