0.14-030715 - defgeneric is not preserving doc-strings
Ram Krishnan <[email protected]> Fri, 1 Aug 2003 07:37:17 -0700
| Newsgroups | gmane.lisp.openmcl.bugs |
|---|---|
| Message-ID | <[email protected]> |
Any doc-string passed into the (:documentation ..) option of a
defgeneric form is not being preserved as the 'function documentation
of the generic function symbol.
I have only confirmed this with 0.14-030715 (and in the CVS head).
In order to get around this, I've added the following patch to
ccl:level-1;l1-clos-boot.lisp which seems to fix the problem.
Index: level-1/l1-clos-boot.lisp
===================================================================
RCS file: /usr/local/publiccvs/ccl/level-1/Attic/l1-clos-boot.lisp,v
retrieving revision 1.1.2.17
diff -u -r1.1.2.17 l1-clos-boot.lisp
--- level-1/l1-clos-boot.lisp 25 Jun 2003 04:24:49 -0000 1.1.2.17
+++ level-1/l1-clos-boot.lisp 1 Aug 2003 14:34:55 -0000
@@ -3099,12 +3099,18 @@
(remove-method gf method))))
(record-source-file function-name 'function)
(record-arglist function-name lambda-list)
- (apply #'ensure-generic-function
- function-name
- :lambda-list lambda-list
- :method-combination method-combination
- :generic-function-class generic-function-class
- options))
+ (prog1
+ (apply #'ensure-generic-function
+ function-name
+ :lambda-list lambda-list
+ :method-combination method-combination
+ :generic-function-class generic-function-class
+ options)
+ (setf (documentation function-name 'function)
+ (destructuring-bind (&rest args &key documentation)
+ options
+ (declare (ignore args))
+ documentation))))
Although, I suspect this is probably not the right place for this to be
done.
Regards,
-ram