From c5cd7a181a2c1204b736ceb0bfebd1a2f55e61f4 Mon Sep 17 00:00:00 2001 From: Clinton Ebadi Date: Mon, 30 Aug 2010 16:57:49 -0400 Subject: [PATCH] makunbound when +unbound-slot+ is passed to default setter for slot attributes * Any custom setters on a CLOS slot will need to implement this behavior --- src/standard-descriptions/clos.lisp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/standard-descriptions/clos.lisp b/src/standard-descriptions/clos.lisp index 377380d..f1465a1 100644 --- a/src/standard-descriptions/clos.lisp +++ b/src/standard-descriptions/clos.lisp @@ -49,7 +49,9 @@ (unless (attribute-setter object) (setf (attribute-setter object) (lambda (v o) - (setf (slot-value o (attribute-slot-name object)) v))))))) + (if (unbound-slot-value-p v) + (slot-makunbound o (attribute-slot-name object)) + (setf (slot-value o (attribute-slot-name object)) v)))))))) (define-layered-method attribute-value-using-object (object (attribute slot-definition-attribute)) -- 2.20.1