/[slime]/slime/swank-ecl.lisp
ViewVC logotype

Diff of /slime/swank-ecl.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by gcarncross, Sat Dec 22 02:53:58 2007 UTC revision 1.11 by gcarncross, Sat Jan 19 15:09:33 2008 UTC
# Line 254  Line 254 
254  (defimplementation make-default-inspector ()  (defimplementation make-default-inspector ()
255    (make-instance 'ecl-inspector))    (make-instance 'ecl-inspector))
256    
257    (defmethod inspect-for-emacs ((o t) (inspector backend-inspector))
258      ; ecl clos support leaves some to be desired
259      (cond
260        ((streamp o)
261         (values
262          (format nil "~S is an ordinary stream" o)
263          (append
264           (list
265            "Open for "
266            (cond
267              ((ignore-errors (interactive-stream-p o)) "Interactive")
268              ((and (input-stream-p o) (output-stream-p o)) "Input and output")
269              ((input-stream-p o) "Input")
270              ((output-stream-p o) "Output"))
271            `(:newline) `(:newline))
272           (label-value-line*
273            ("Element type" (stream-element-type o))
274            ("External format" (stream-external-format o)))
275           (ignore-errors (label-value-line*
276                           ("Broadcast streams" (broadcast-stream-streams o))))
277           (ignore-errors (label-value-line*
278                           ("Concatenated streams" (concatenated-stream-streams o))))
279           (ignore-errors (label-value-line*
280                           ("Echo input stream" (echo-stream-input-stream o))))
281           (ignore-errors (label-value-line*
282                           ("Echo output stream" (echo-stream-output-stream o))))
283           (ignore-errors (label-value-line*
284                           ("Output String" (get-output-stream-string o))))
285           (ignore-errors (label-value-line*
286                           ("Synonym symbol" (synonym-stream-symbol o))))
287           (ignore-errors (label-value-line*
288                           ("Input stream" (two-way-stream-input-stream o))))
289           (ignore-errors (label-value-line*
290                           ("Output stream" (two-way-stream-output-stream o)))))))
291        (t
292         (let* ((cl (si:instance-class o))
293                (slots (clos:class-slots cl)))
294           (values (format nil "~S is an instance of class ~A"
295                           o (clos::class-name cl))
296                   (loop for x in slots append
297                        (let* ((name (clos:slot-definition-name x))
298                               (value (clos::slot-value o name)))
299                          (list
300                           (format nil "~S: " name)
301                           `(:value ,value)
302                           `(:newline)))))))))
303    
304  ;;;; Definitions  ;;;; Definitions
305    
306  (defimplementation find-definitions (name) nil)  (defimplementation find-definitions (name) nil)

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.5