When a function object is given to describe function documentation is not shown (it's shown on the symbol). Because of this, the slime function documentation doesn't show it either.
Index: src/org/armedbear/lisp/describe.lisp =================================================================== --- src/org/armedbear/lisp/describe.lisp (revision 14850) +++ src/org/armedbear/lisp/describe.lisp (working copy) @@ -89,7 +89,13 @@ (setf plist (cddr plist)))))) (FUNCTION (%describe-object object stream) - (describe-arglist object stream)) + (describe-arglist object stream) + (let ((function-symbol (nth-value 2 (function-lambda-expression object)))) + (when function-symbol + (let ((doc (documentation function-symbol 'function))) + (when doc + (format stream "Function documentation:~% ~A~%" doc))) + ))) (INTEGER (%describe-object object stream) (format stream "~D.~%~
On 5/29/16 22:55, Alan Ruttenberg wrote:
When a function object is given to describe function documentation is not shown (it's shown on the symbol). Because of this, the slime function documentation doesn't show it either.
Thanks for the patch. Unfortunately, I can't see a before/after change in ABCL behavior after the patch.
I would expect the (describe '#foo) form below to output the function definition with your patch but don't see it.
I have to dash to an appointment later, so will need to work on reproduction of a good before/after in a bit.
CL-USER> (defun foo () "Function documentation" 123) CL-USER> (describe 'foo) FOO is an internal symbol in the COMMON-LISP-USER package. Its function binding is #<FOO {2EF4FBFC}>. The function's lambda list is: NIL Function documentation: Function documentation The symbol's property list contains these indicator/value pairs: SYSTEM::%SOURCE :TOP-LEVEL ; No value CL-USER> (describe #'foo) #<FOO {2EF4FBFC}> is an object of type FUNCTION. The function's lambda list is: NIL ; No value
Odd. Attaching the file I'm using to patch. Maybe I screwed up the diff. Here's what I see after loading:
(defun foo () "Function documentation" 123) (describe 'foo) FOO is an internal symbol in the COMMON-LISP-USER package. Its function binding is #<FOO {4956CD8E}>. The function's lambda list is: NIL Function documentation: Function documentation The symbol's property list contains these indicator/value pairs: SYSTEM::%SOURCE :TOP-LEVEL
(describe #'foo) #<FOO {4956CD8E}> is an object of type COMPILED-FUNCTION. The function's lambda list is: NIL Function documentation: Function documentation
On Tue, May 31, 2016 at 9:00 AM Mark Evenson evenson@panix.com wrote:
On 5/29/16 22:55, Alan Ruttenberg wrote:
When a function object is given to describe function documentation is not shown (it's shown on the symbol). Because of this, the slime function documentation doesn't show it either.
Thanks for the patch. Unfortunately, I can't see a before/after change in ABCL behavior after the patch.
I would expect the (describe '#foo) form below to output the function definition with your patch but don't see it.
I have to dash to an appointment later, so will need to work on reproduction of a good before/after in a bit.
CL-USER> (defun foo () "Function documentation" 123) CL-USER> (describe 'foo) FOO is an internal symbol in the COMMON-LISP-USER package. Its function binding is #<FOO {2EF4FBFC}>. The function's lambda list is: NIL Function documentation: Function documentation The symbol's property list contains these indicator/value pairs: SYSTEM::%SOURCE :TOP-LEVEL ; No value CL-USER> (describe #'foo) #<FOO {2EF4FBFC}> is an object of type FUNCTION. The function's lambda list is: NIL ; No value
-- "A screaming comes across the sky. It has happened before, but there is nothing to compare to it now."
armedbear-devel@common-lisp.net