[slime-devel] inspect-slot-for-emacs

Knut Olav Bøhmer knobo at online.no
Wed Oct 10 13:33:19 UTC 2007


How about doing something like this in inspect-slot-for-emacs

file:  cvs/slime/contrib/swank-fancy-inspector.lisp function:
inspect-slot-for-emacs

                       (eval (read-from-string value-string))))))))
+      (:action ,(custom-inspect-name class object slot)
+           ,(lambda () (custom-inspect-call class object slot)))
      ,@(when boundp
          `(" " (:action "[make unbound]"

With the following methods something like this:

(defmethod custom-inspect-name (class object slot)
    "[No custom inspections]")

(defmethod custom-inspect-call (class object slot)
   nil)

And then one could make own methods specializing on your own classes and
slots.

(defmethod custom-inspect-name ((class person) object (slot company))
   (format nil  "[boss of ~a]" (name-of person))

(defmethod custom-inspect-call ((class person) object (slot company))
   (slime-inspect (boss-of person))
 
Or whatever object models you have. Maybe make custom-inspect-call to
follow relations in cl-sql....

(and add necessary checks, restarts and handler-cases)




-- 
Free Software Consultant
Cell: +47 - 47 34 40 08
Phone: +47 - 21 53 69 00, Fax: +47 - 21 53 69 09
Addr: Slemdalsveien 70, PB 1 Vinderen, 0319 Oslo
<http://www.freecode.no/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20071010/62b7807c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logo_horizontal.png
Type: image/png
Size: 7619 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20071010/62b7807c/attachment.png>


More information about the slime-devel mailing list