[slime-cvs] CVS update: slime/swank-cmucl.lisp

Marco Baringer mbaringer at common-lisp.net
Wed Sep 15 17:33:58 UTC 2004


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv2882

Modified Files:
	swank-cmucl.lisp 
Log Message:
(inspect-for-emacs): Insert function object's documentation when it's
available.

Date: Wed Sep 15 19:33:57 2004
Author: mbaringer

Index: slime/swank-cmucl.lisp
diff -u slime/swank-cmucl.lisp:1.116 slime/swank-cmucl.lisp:1.117
--- slime/swank-cmucl.lisp:1.116	Tue Sep 14 18:01:06 2004
+++ slime/swank-cmucl.lisp	Wed Sep 15 19:33:57 2004
@@ -1747,13 +1747,16 @@
   (let ((header (kernel:get-type o)))
     (cond ((= header vm:function-header-type)
 	   (values "A function."
-                   `("Self: " (:value ,(kernel:%function-self o))
+                   `("Name: " (:value ,(kernel:%function-name o))
                      (:newline)
-                     "Next: " (:value ,(kernel:%function-next o))
+                     "Arglist: " (:value ,(kernel:%function-arglist o))
                      (:newline)
-                     "Name: " (:value ,(kernel:%function-name o))
+                     ,@(when (documentation o t)
+                         `("Documentation: " (:newline) ,(documentation o t)))
                      (:newline)
-                     "Arglist: " (:value ,(kernel:%function-arglist o))
+                     "Self: " (:value ,(kernel:%function-self o))
+                     (:newline)
+                     "Next: " (:value ,(kernel:%function-next o))
                      (:newline)
                      "Type: " (:value ,(kernel:%function-type o))
                      (:newline)
@@ -1763,6 +1766,8 @@
 		   (list*
                     `("Function: " (:value ,(kernel:%closure-function o))
                       (:newline)
+                      ,@(when (documentation o t)
+                          `("Documentation: " (:newline) ,(documentation o t) (:newline)))
                       (loop for i from 0 below (- (kernel:get-closure-length o) 
                                                   (1- vm:closure-info-offset))
                          collect (princ-to-string i)
@@ -1784,7 +1789,11 @@
                     collect '(:newline))
             "Debug info: " (:value ,(kernel:%code-debug-info o))
             (:newline)
-            "Instructions: " (:value ,(kernel:code-instructions o)))))
+            "Instructions: " (:value ,(kernel:code-instructions o))
+            (:newline)
+            ,@(when (documentation o t)
+                `("Documentation: " (:newline) ,(documentation o t)))
+            (:newline))))
 
 (defmethod inspect-for-emacs ((o kernel:fdefn) (inspector cmucl-inspector))
   (declare (ignore inspector))





More information about the slime-cvs mailing list