[slime-cvs] CVS slime

CVS User mevenson mevenson at common-lisp.net
Thu Mar 4 13:22:29 UTC 2010


Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv12933

Modified Files:
	ChangeLog swank-abcl.lisp 
Log Message:
swank-abcl.lisp (emacs-inspect): Define default method to use the
result of SYS:INSPECTED-PARTS if non-nil.



--- /project/slime/cvsroot/slime/ChangeLog	2010/03/03 19:51:33	1.2013
+++ /project/slime/cvsroot/slime/ChangeLog	2010/03/04 13:22:29	1.2014
@@ -1,3 +1,8 @@
+2010-03-04  Mark Evenson  <evenson at panix.com>
+
+	* swank-abcl.lisp (emacs-inspect): Define default method to use
+	the result of SYS:INSPECTED-PARTS if non-nil. 
+
 2010-03-03  Stas Boukarev  <stassats at gmail.com>
 
 	* doc/slime.texi (Inspector): document slime-inspector-eval.
--- /project/slime/cvsroot/slime/swank-abcl.lisp	2010/03/02 12:38:06	1.82
+++ /project/slime/cvsroot/slime/swank-abcl.lisp	2010/03/04 13:22:29	1.83
@@ -517,6 +517,14 @@
 |#
 
 ;;;; Inspecting
+(defmethod emacs-inspect ((o t))
+  (let ((parts (sys:inspected-parts o)))
+    `("The object is of type " ,(symbol-name (type-of o)) "." (:newline)
+      ,@(if parts
+           (loop :for (label . value) :in parts
+              :appending (label-value-line label value))
+            (list "No inspectable parts, dumping output of CL:DESCRIBE:" '(:newline) 
+                  (with-output-to-string (desc) (describe o desc)))))))
 
 (defmethod emacs-inspect ((slot mop::slot-definition))
   `("Name: " (:value ,(mop::%slot-definition-name slot))
@@ -544,20 +552,8 @@
                    `("Documentation:" (:newline) ,(documentation f t) (:newline)))
       ,@(when (function-lambda-expression f)
               `("Lambda expression:" 
-                (:newline) ,(princ-to-string (function-lambda-expression f)) (:newline)))))
-
-#|
-;;; XXX -- the default SLIME implementation looks ok.  Remove?  --ME 20100111
-(defmethod emacs-inspect ((o t))
-  (let* ((class (class-of o))
-         (slots (mop::class-slots class)))
-            (mapcar (lambda (slot)
-                      (let ((name (mop::slot-definition-name slot)))
-                        (cons (princ-to-string name)
-                              (slot-value o name))))
-                    slots)))
-|#
-
+                (:newline) ,(princ-to-string
+                             (function-lambda-expression f)) (:newline)))))
 
 ;;; Although by convention toString() is supposed to be a
 ;;; non-computationally expensive operation this isn't always the





More information about the slime-cvs mailing list