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

Diff of /slime/swank.lisp

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

revision 1.599 by nsiivola, Tue Oct 7 14:54:53 2008 UTC revision 1.600 by nsiivola, Fri Oct 10 06:09:32 2008 UTC
# Line 44  Line 44 
44             #:*swank-pprint-bindings*             #:*swank-pprint-bindings*
45             #:*record-repl-results*             #:*record-repl-results*
46             #:*debug-on-swank-error*             #:*debug-on-swank-error*
47               #:*inspector-verbose*
48             ;; These are re-exported directly from the backend:             ;; These are re-exported directly from the backend:
49             #:buffer-first-change             #:buffer-first-change
50             #:frame-source-location-for-emacs             #:frame-source-location-for-emacs
# Line 2905  DSPEC is a string and LOCATION a source Line 2906  DSPEC is a string and LOCATION a source
2906    
2907    
2908  ;;;; Inspecting  ;;;; Inspecting
2909    (defvar *inspector-verbose* nil)
2910    
2911  (defstruct (inspector-state (:conc-name istate.))  (defstruct (inspector-state (:conc-name istate.))
2912    object    object
2913      (verbose *inspector-verbose*)
2914    (parts (make-array 10 :adjustable t :fill-pointer 0))    (parts (make-array 10 :adjustable t :fill-pointer 0))
2915    (actions (make-array 10 :adjustable t :fill-pointer 0))    (actions (make-array 10 :adjustable t :fill-pointer 0))
2916    content    content
# Line 2942  DSPEC is a string and LOCATION a source Line 2945  DSPEC is a string and LOCATION a source
2945      (emacs-inspect object)))      (emacs-inspect object)))
2946    
2947  (defun istate>elisp (istate)  (defun istate>elisp (istate)
2948    (list :title (call/truncated-output-to-string    (list :title (if (istate.verbose istate)
2949                  200                     (let ((*print-escape* t)
2950                  (lambda (s)                           (*print-circle* t)
2951                    (print-unreadable-object ((istate.object istate)                           (*print-array* nil))
2952                                             s :type t :identity t))))                       (to-string (istate.object istate)))
2953                       (call/truncated-output-to-string
2954                        200
2955                        (lambda (s)
2956                          (print-unreadable-object
2957                              ((istate.object istate) s :type t :identity t)))))
2958          :id (assign-index (istate.object istate) (istate.parts istate))          :id (assign-index (istate.object istate) (istate.parts istate))
2959          :content (prepare-range istate 0 500)))          :content (prepare-range istate 0 500)))
2960    
# Line 3014  DSPEC is a string and LOCATION a source Line 3022  DSPEC is a string and LOCATION a source
3022    
3023  (defslimefun inspect-nth-part (index)  (defslimefun inspect-nth-part (index)
3024    (with-buffer-syntax ()    (with-buffer-syntax ()
3025      (inspect-object (inspector-nth-part index))))      (let ((*inspector-verbose* (istate.verbose *istate*)))
3026          (inspect-object (inspector-nth-part index)))))
3027    
3028  (defslimefun inspector-range (from to)  (defslimefun inspector-range (from to)
3029    (prepare-range *istate* from to))    (prepare-range *istate* from to))
# Line 3049  Return nil if there's no previous object Line 3058  Return nil if there's no previous object
3058          (emacs-inspect/printer-bindings (istate.object *istate*)))          (emacs-inspect/printer-bindings (istate.object *istate*)))
3059    (istate>elisp *istate*))    (istate>elisp *istate*))
3060    
3061    (defslimefun inspector-toggle-verbose ()
3062      "Toggle verbosity of inspected object."
3063      (setf (istate.verbose *istate*) (not (istate.verbose *istate*)))
3064      (istate>elisp *istate*))
3065    
3066  (defslimefun quit-inspector ()  (defslimefun quit-inspector ()
3067    (reset-inspector)    (reset-inspector)
3068    nil)    nil)

Legend:
Removed from v.1.599  
changed lines
  Added in v.1.600

  ViewVC Help
Powered by ViewVC 1.1.5