Fix multiple evaluation of `object' form in `with-described-object'
authorClinton Ebadi <clinton@unknownlamer.org>
Fri, 24 Dec 2010 20:02:14 +0000 (15:02 -0500)
committerClinton Ebadi <clinton@unknownlamer.org>
Fri, 24 Dec 2010 20:02:14 +0000 (15:02 -0500)
src/mao/description.lisp

index 8f7348d..37c3e4e 100644 (file)
                   (without-special-symbol-access 
                     (funcall  function))))))))))))
 
                   (without-special-symbol-access 
                     (funcall  function))))))))))))
 
-(defmacro with-described-object ((object &optional (description `(description-of ,object)))
+(defmacro with-described-object ((object &optional description)
                                 &body body)
                                 &body body)
-  `(funcall-with-described-object (lambda (),@body) ,object ,description))
+  (once-only (object)
+    `(funcall-with-described-object (lambda (),@body) ,object ,(or description
+                                                             `(description-of ,object)))))