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

Diff of /slime/swank.lisp

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

revision 1.498 by mkoeppe, Sat Aug 25 04:56:50 2007 UTC revision 1.499 by mkoeppe, Sat Aug 25 20:04:19 2007 UTC
# Line 199  Backend code should treat the connection Line 199  Backend code should treat the connection
199    (user-input       nil :type (or stream null))    (user-input       nil :type (or stream null))
200    (user-output      nil :type (or stream null))    (user-output      nil :type (or stream null))
201    (user-io          nil :type (or stream null))    (user-io          nil :type (or stream null))
202      ;; A stream that we use for *trace-output*; if nil, we user user-output.
203      (trace-output     nil :type (or stream null))
204    ;; A stream where we send REPL results.    ;; A stream where we send REPL results.
205    (repl-results     nil :type (or stream null))    (repl-results     nil :type (or stream null))
206    ;; In multithreaded systems we delegate certain tasks to specific    ;; In multithreaded systems we delegate certain tasks to specific
# Line 573  DEDICATED-OUTPUT INPUT OUTPUT IO REPL-RE Line 575  DEDICATED-OUTPUT INPUT OUTPUT IO REPL-RE
575          (let ((out (or dedicated-output out)))          (let ((out (or dedicated-output out)))
576            (let ((io (make-two-way-stream in out)))            (let ((io (make-two-way-stream in out)))
577              (mapc #'make-stream-interactive (list in out io))              (mapc #'make-stream-interactive (list in out io))
578              (let* ((repl-results-fn              (let ((repl-results
579                      (make-output-function-for-target connection :repl-result))                     (make-output-stream-for-target connection :repl-result)))
                    (repl-results  
                     (nth-value 1 (make-fn-streams  
                                   (lambda ()  
                                     (error "Should never be called"))  
                                   repl-results-fn))))  
580                (values dedicated-output in out io repl-results))))))))                (values dedicated-output in out io repl-results))))))))
581    
582  (defun make-output-function (connection)  (defun make-output-function (connection)
# Line 609  stream (or NIL if none was created)." Line 606  stream (or NIL if none was created)."
606            (abort "Abort sending output to Emacs.")            (abort "Abort sending output to Emacs.")
607          (send-to-emacs `(:write-string ,string nil ,target))))))          (send-to-emacs `(:write-string ,string nil ,target))))))
608    
609    (defun make-output-stream-for-target (connection target)
610      "Create a stream that sends output to a specific TARGET in Emacs."
611      (nth-value 1 (make-fn-streams
612                    (lambda ()
613                      (error "Should never be called"))
614                    (make-output-function-for-target connection target))))
615    
616  (defun open-dedicated-output-stream (socket-io)  (defun open-dedicated-output-stream (socket-io)
617    "Open a dedicated output connection to the Emacs on SOCKET-IO.    "Open a dedicated output connection to the Emacs on SOCKET-IO.
618  Return an output stream suitable for writing program output.  Return an output stream suitable for writing program output.
# Line 1150  NIL if streams are not globally redirect Line 1154  NIL if streams are not globally redirect
1154    (let* ((io  (connection.user-io connection))    (let* ((io  (connection.user-io connection))
1155           (in  (connection.user-input connection))           (in  (connection.user-input connection))
1156           (out (connection.user-output connection))           (out (connection.user-output connection))
1157             (trace (or (connection.trace-output connection) out))
1158           (*standard-output* out)           (*standard-output* out)
1159           (*error-output* out)           (*error-output* out)
1160           (*trace-output* out)           (*trace-output* trace)
1161           (*debug-io* io)           (*debug-io* io)
1162           (*query-io* io)           (*query-io* io)
1163           (*standard-input* in)           (*standard-input* in)
# Line 4035  Include the nicknames if NICKNAMES is tr Line 4040  Include the nicknames if NICKNAMES is tr
4040  (defslimefun untrace-all ()  (defslimefun untrace-all ()
4041    (untrace))    (untrace))
4042    
4043    (defslimefun redirect-trace-output (target)
4044      (setf (connection.trace-output *emacs-connection*)
4045            (make-output-stream-for-target *emacs-connection* target))
4046      nil)
4047    
4048    
4049  ;;;; Undefing  ;;;; Undefing
4050    

Legend:
Removed from v.1.498  
changed lines
  Added in v.1.499

  ViewVC Help
Powered by ViewVC 1.1.5