- (etypecase x
- (generic-function
- (slot-value x '%documentation))
- #+sb-eval
- (sb-eval:interpreted-function
- (sb-eval:interpreted-function-documentation x))
- (function
- (%fun-doc x))))
+ (if (typep x 'generic-function)
+ (slot-value x '%documentation)
+ (%fun-doc x)))
+
+(defun (setf fun-doc) (new-value x)
+ (if (typep x 'generic-function)
+ (setf (slot-value x '%documentation) new-value)
+ (setf (%fun-doc x) new-value)))