[Openmcl-cvs-notifications] r7554 - /trunk/ccl/lib/describe.lisp
gb at clozure.com
gb at clozure.com
Tue Oct 30 14:12:31 MDT 2007
Author: gb
Date: Tue Oct 30 16:12:31 2007
New Revision: 7554
Log:
Show function docstring when describing functions.
Modified:
trunk/ccl/lib/describe.lisp
Modified: trunk/ccl/lib/describe.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/ccl/lib/describe.lisp (original)
+++ trunk/ccl/lib/describe.lisp Tue Oct 30 16:12:31 2007
@@ -1151,17 +1151,23 @@
(+ 1 ; the function
1 ; name
1 ; arglist
+ (let* ((doc (documentation (inspector-object f) t)))
+ (if doc 1 0))
(compute-disassembly-lines f))) =
=
(defmethod line-n ((f function-inspector) n)
- (let ((o (inspector-object f)))
+ (let* ((o (inspector-object f))
+ (doc (documentation o t)))
(case n
(0 (values o ""))
(1 (values (function-name o) "Name" :colon))
(2 (multiple-value-bind (arglist type) (arglist o)
(let ((label (if type (format nil "Arglist (~(~a~))" type) "Arg=
list unknown")))
(values arglist label (if type :colon '(:comment (:plain)))))=
))
- (t (disassembly-line-n f (- n 3))))))
+ (3 (if doc
+ (values (substitute #\space #\newline doc) "Documentation" :col=
on)
+ (disassembly-line-n f (- n 3))))
+ (t (disassembly-line-n f (- n (if doc 4 3)))))))
=
(defmethod compute-line-count ((f closure-inspector))
(let* ((o (inspector-object f))
More information about the Openmcl-cvs-notifications
mailing list