function documentation patch

Alan Ruttenberg alanruttenberg at gmail.com
Sun May 29 20:55:48 UTC 2016


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.~%~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20160529/14da3b97/attachment.html>


More information about the armedbear-devel mailing list