0.9.0.38:
[sbcl.git] / src / pcl / documentation.lisp
index b728992..f1ab48b 100644 (file)
   (setf (random-documentation x 'method-combination) new-value))
 \f
 ;;; methods
-(defmethod documentation ((method standard-method) (doc-type (eql 't)))
-  (slot-value slotd 'documentation))
+(defmethod documentation ((x standard-method) (doc-type (eql 't)))
+  (slot-value x 'documentation))
 
 (defmethod (setf documentation)
-    (new-value (method standard-method) (doc-type (eql 't)))
-  (setf (slot-value method 'documentation) new-value))
+    (new-value (x standard-method) (doc-type (eql 't)))
+  (setf (slot-value x 'documentation) new-value))
 \f
 ;;; packages
 
          (slot-value class 'documentation)))))
 
 (defmethod documentation ((x symbol) (doc-type (eql 'structure)))
-  (when (eq (info :type :kind x) :instance)
-    (values (info :type :documentation x))))
+  (cond ((eq (info :type :kind x) :instance)
+        (values (info :type :documentation x)))
+       ((info :typed-structure :info x)
+        (values (info :typed-structure :documentation x)))
+       (t
+        (error "~S is not the name of a structure type." x))))
 
 (defmethod (setf documentation) (new-value
                                 (x structure-class)
 (defmethod (setf documentation) (new-value
                                 (x symbol)
                                 (doc-type (eql 'structure)))
-  (unless (eq (info :type :kind x) :instance)
-    (error "~S is not the name of a structure type." x))
-  (setf (info :type :documentation x) new-value))
+  (cond ((eq (info :type :kind x) :instance)
+        (setf (info :type :documentation x) new-value))
+       ((info :typed-structure :info x)
+        (setf (info :typed-structure :documentation x) new-value))
+       (t
+        (error "~S is not the name of a structure type." x))))
+  
 \f
 ;;; variables
 (defmethod documentation ((x symbol) (doc-type (eql 'variable)))