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

Diff of /slime/swank.lisp

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

revision 1.472 by mbaringer, Sun Apr 8 18:55:52 2007 UTC revision 1.473 by mbaringer, Sun Apr 8 22:56:18 2007 UTC
# Line 4544  NIL is returned if the list is circular. Line 4544  NIL is returned if the list is circular.
4544                        size)                        size)
4545              ,(lambda()              ,(lambda()
4546                 (let ((*slime-inspect-contents-limit* nil))                 (let ((*slime-inspect-contents-limit* nil))
4547                   (values                   (swank::inspect-object thing)))))
                   (swank::inspect-object thing)  
                   :replace)))))  
4548    
4549  (defmethod inspect-show-more-action (thing)  (defmethod inspect-show-more-action (thing)
4550    `(:action ,(format nil "~a elements shown. Prompt for how many to inspect..."    `(:action ,(format nil "~a elements shown. Prompt for how many to inspect..."
# Line 4554  NIL is returned if the list is circular. Line 4552  NIL is returned if the list is circular.
4552              ,(lambda()              ,(lambda()
4553                 (let ((*slime-inspect-contents-limit*                 (let ((*slime-inspect-contents-limit*
4554                        (progn (format t "How many elements should be shown? ") (read))))                        (progn (format t "How many elements should be shown? ") (read))))
4555                   (values                   (swank::inspect-object thing)))))
                   (swank::inspect-object thing)  
                   :replace)))))  
4556    
4557  (defmethod inspect-for-emacs ((array array) inspector)  (defmethod inspect-for-emacs ((array array) inspector)
4558    (declare (ignore inspector))    (declare (ignore inspector))
# Line 5219  See `methods-by-applicability'.") Line 5215  See `methods-by-applicability'.")
5215                          ,(let ((pathname (pathname stream))                          ,(let ((pathname (pathname stream))
5216                                 (position (file-position stream)))                                 (position (file-position stream)))
5217                             (lambda ()                             (lambda ()
5218                               (ed-in-emacs `(,pathname :charpos ,position)))))                               (ed-in-emacs `(,pathname :charpos ,position))))
5219                            :refresh nil)
5220                 (:newline))                 (:newline))
5221               content))))               content))))
5222    
# Line 5238  See `methods-by-applicability'.") Line 5235  See `methods-by-applicability'.")
5235                                ,(let ((pathname (pathname stream))                                ,(let ((pathname (pathname stream))
5236                                       (position (file-position stream)))                                       (position (file-position stream)))
5237                                      (lambda ()                                      (lambda ()
5238                                        (ed-in-emacs `(,pathname :charpos ,position)))))                                        (ed-in-emacs `(,pathname :charpos ,position))))
5239                                  :refresh nil)
5240                       (:newline))                       (:newline))
5241                     content))                     content))
5242            (values title content)))))            (values title content)))))
# Line 5342  See `methods-by-applicability'.") Line 5340  See `methods-by-applicability'.")
5340                     (string #\newline))                     (string #\newline))
5341                    ((:value obj &optional str)                    ((:value obj &optional str)
5342                     (value-part-for-emacs obj str))                     (value-part-for-emacs obj str))
5343                    ((:action label lambda)                    ((:action label lambda &key (refreshp t))
5344                     (action-part-for-emacs label lambda)))))))                     (action-part-for-emacs label lambda refreshp)))))))
5345    
5346  (defun assign-index (object vector)  (defun assign-index (object vector)
5347    (let ((index (fill-pointer vector)))    (let ((index (fill-pointer vector)))
# Line 5355  See `methods-by-applicability'.") Line 5353  See `methods-by-applicability'.")
5353          (or string (print-part-to-string object))          (or string (print-part-to-string object))
5354          (assign-index object *inspectee-parts*)))          (assign-index object *inspectee-parts*)))
5355    
5356  (defun action-part-for-emacs (label lambda)  (defun action-part-for-emacs (label lambda refreshp)
5357    (list :action label (assign-index lambda *inspectee-actions*)))    (list :action label (assign-index (list lambda refreshp)
5358                                        *inspectee-actions*)))
5359    
5360  (defun inspect-object (object &optional (inspector (make-default-inspector)))  (defun inspect-object (object &optional (inspector (make-default-inspector)))
5361    (push (setq *inspectee* object) *inspector-stack*)    (push (setq *inspectee* object) *inspector-stack*)
# Line 5380  See `methods-by-applicability'.") Line 5379  See `methods-by-applicability'.")
5379      (inspect-object (inspector-nth-part index))))      (inspect-object (inspector-nth-part index))))
5380    
5381  (defslimefun inspector-call-nth-action (index &rest args)  (defslimefun inspector-call-nth-action (index &rest args)
5382    (multiple-value-bind (value replace) (apply (aref *inspectee-actions* index) args)    (destructuring-bind (action-lambda refreshp)
5383        (if (eq replace :replace)        (aref *inspectee-actions* index)
5384            value      (apply action-lambda args)
5385            (inspect-object (pop *inspector-stack*)))))      (if refreshp
5386            (inspect-object (pop *inspector-stack*))
5387            ;; tell emacs that we don't want to refresh the inspector buffer
5388            nil)))
5389    
5390  (defslimefun inspector-pop ()  (defslimefun inspector-pop ()
5391    "Drop the inspector stack and inspect the second element.  Return    "Drop the inspector stack and inspect the second element.  Return

Legend:
Removed from v.1.472  
changed lines
  Added in v.1.473

  ViewVC Help
Powered by ViewVC 1.1.5