(%fun-doc x))
(defmethod documentation ((x list) (doc-type (eql 'function)))
- ;; FIXME: could test harder to see whether it's a SETF function name,
- ;; then call WARN
- (when (eq (first x) 'setf) ; Give up if not a setf function name.
- (or (values (info :setf :documentation (second x)))
- ;; Try the pcl function documentation.
- (and (fboundp x) (documentation (fdefinition x) t)))))
+ (and (legal-fun-name-p x)
+ (fboundp x)
+ (documentation (fdefinition x) t)))
(defmethod documentation ((x symbol) (doc-type (eql 'function)))
(or (values (info :function :documentation x))
(values (info :setf :documentation x)))
(defmethod (setf documentation) (new-value (x list) (doc-type (eql 'function)))
- (setf (info :setf :documentation (cadr x)) new-value))
+ (setf (info :function :documentation x) new-value))
(defmethod (setf documentation) (new-value
(x symbol)
;;; other code which does low-level hacking of packages.. -- WHN 19991203
;;; types, classes, and structure names
-(defmethod documentation ((x cl:structure-class) (doc-type (eql 't)))
- (values (info :type :documentation (cl:class-name x))))
-
(defmethod documentation ((x structure-class) (doc-type (eql 't)))
(values (info :type :documentation (class-name x))))
-(defmethod documentation ((x cl:standard-class) (doc-type (eql 't)))
- (or (values (info :type :documentation (cl:class-name x)))
- (let ((pcl-class (sb-kernel:class-pcl-class x)))
- (and pcl-class (plist-value pcl-class 'documentation)))))
-
-(defmethod documentation ((x cl:structure-class) (doc-type (eql 'type)))
- (values (info :type :documentation (cl:class-name x))))
-
(defmethod documentation ((x structure-class) (doc-type (eql 'type)))
(values (info :type :documentation (class-name x))))
-(defmethod documentation ((x cl:standard-class) (doc-type (eql 'type)))
- (or (values (info :type :documentation (cl:class-name x)))
- (let ((pcl-class (sb-kernel:class-pcl-class x)))
- (and pcl-class (plist-value pcl-class 'documentation)))))
-
(defmethod documentation ((x symbol) (doc-type (eql 'type)))
(or (values (info :type :documentation x))
(let ((class (find-class x nil)))
(values (info :type :documentation x))))
(defmethod (setf documentation) (new-value
- (x cl:structure-class)
- (doc-type (eql 't)))
- (setf (info :type :documentation (cl:class-name x)) new-value))
-
-(defmethod (setf documentation) (new-value
(x structure-class)
(doc-type (eql 't)))
(setf (info :type :documentation (class-name x)) new-value))
(defmethod (setf documentation) (new-value
- (x cl:structure-class)
- (doc-type (eql 'type)))
- (setf (info :type :documentation (cl:class-name x)) new-value))
-
-(defmethod (setf documentation) (new-value
(x structure-class)
(doc-type (eql 'type)))
(setf (info :type :documentation (class-name x)) new-value))