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

Diff of /slime/swank.lisp

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

revision 1.425 by alendvai, Mon Dec 11 14:12:14 2006 UTC revision 1.426 by nsiivola, Tue Dec 12 15:40:23 2006 UTC
# Line 18  Line 18 
18             #:start-server             #:start-server
19             #:create-server             #:create-server
20             #:ed-in-emacs             #:ed-in-emacs
21               #:inspect-in-emacs
22             #:print-indentation-lossage             #:print-indentation-lossage
23             #:swank-debugger-hook             #:swank-debugger-hook
24             #:run-after-init-hook             #:run-after-init-hook
# Line 730  of the toplevel restart." Line 731  of the toplevel restart."
731       (send (find-thread thread-id) `(take-input ,tag ,value)))       (send (find-thread thread-id) `(take-input ,tag ,value)))
732      (((:write-string :presentation-start :presentation-end      (((:write-string :presentation-start :presentation-end
733                       :new-package :new-features :ed :%apply :indentation-update                       :new-package :new-features :ed :%apply :indentation-update
734                       :eval-no-wait :background-message)                       :eval-no-wait :background-message :inspect)
735        &rest _)        &rest _)
736       (declare (ignore _))       (declare (ignore _))
737       (encode-message event socket-io))))       (encode-message event socket-io))))
# Line 872  of the toplevel restart." Line 873  of the toplevel restart."
873        (((:write-string :new-package :new-features :debug-condition        (((:write-string :new-package :new-features :debug-condition
874                         :presentation-start :presentation-end                         :presentation-start :presentation-end
875                         :indentation-update :ed :%apply :eval-no-wait                         :indentation-update :ed :%apply :eval-no-wait
876                         :background-message)                         :background-message :inspect)
877          &rest _)          &rest _)
878         (declare (ignore _))         (declare (ignore _))
879         (send event)))))         (send event)))))
# Line 2666  Returns true if it actually called emacs Line 2667  Returns true if it actually called emacs
2667             (send-oob-to-emacs `(:ed ,target))))             (send-oob-to-emacs `(:ed ,target))))
2668          (t nil)))))          (t nil)))))
2669    
2670    (defslimefun inspect-in-emacs (what)
2671      "Inspect WHAT in Emacs."
2672      (flet ((send-it ()
2673               (with-buffer-syntax ()
2674                 (reset-inspector)
2675                 (send-oob-to-emacs `(:inspect ,(inspect-object what))))))
2676        (cond
2677          (*emacs-connection*
2678           (send-it))
2679          ((default-connection)
2680           (with-connection ((default-connection))
2681             (send-it))))))
2682    
2683  (defslimefun value-for-editing (form)  (defslimefun value-for-editing (form)
2684    "Return a readable value of FORM for editing in Emacs.    "Return a readable value of FORM for editing in Emacs.
2685  FORM is expected, but not required, to be SETF'able."  FORM is expected, but not required, to be SETF'able."
# Line 4668  See `methods-by-applicability'.") Line 4682  See `methods-by-applicability'.")
4682  (defmethod inspect-for-emacs ((i integer) inspector)  (defmethod inspect-for-emacs ((i integer) inspector)
4683    (declare (ignore inspector))    (declare (ignore inspector))
4684    (values "A number."    (values "A number."
4685            (append            (append
4686             `(,(format nil "Value: ~D = #x~X = #o~O = #b~,,' ,8:B = ~E"             `(,(format nil "Value: ~D = #x~8,'0X = #o~O = #b~,,' ,8:B = ~E"
4687                        i i i i i)                        i i i i i)
4688                (:newline))                (:newline))
4689             (if (< -1 i char-code-limit)             (when (< -1 i char-code-limit)
4690                 (label-value-line "Corresponding character" (code-char i)))               (label-value-line "Code-char" (code-char i)))
4691             (label-value-line "Length" (integer-length i))             (label-value-line "Integer-length" (integer-length i))
4692             (ignore-errors             (ignore-errors
4693               (list "As time: "               (label-value-line "Universal-time" (format-iso8601-time i t))))))
                    (format-iso8601-time i t))))))  
4694    
4695  (defmethod inspect-for-emacs ((c complex) inspector)  (defmethod inspect-for-emacs ((c complex) inspector)
4696    (declare (ignore inspector))    (declare (ignore inspector))
# Line 4814  See `methods-by-applicability'.") Line 4827  See `methods-by-applicability'.")
4827      (multiple-value-bind (title content)      (multiple-value-bind (title content)
4828          (inspect-for-emacs object inspector)          (inspect-for-emacs object inspector)
4829        (list :title title        (list :title title
4830              :type (to-string (type-of object))              :type (to-string (type-for-emacs object))
4831              :content (inspector-content-for-emacs content)              :content (inspector-content-for-emacs content)
4832              :id (assign-index object *inspectee-parts*)))))              :id (assign-index object *inspectee-parts*)))))
4833    

Legend:
Removed from v.1.425  
changed lines
  Added in v.1.426

  ViewVC Help
Powered by ViewVC 1.1.5