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

Diff of /slime/swank.lisp

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

revision 1.758 by heller, Sun Nov 6 17:06:49 2011 UTC revision 1.759 by sboukarev, Wed Nov 16 10:01:18 2011 UTC
# Line 876  first." Line 876  first."
876    (create-server :port port :style style :dont-close dont-close    (create-server :port port :style style :dont-close dont-close
877                   :coding-system coding-system))                   :coding-system coding-system))
878    
 ;; FIXME: get rid of coding-system argument  
879  (defun accept-connections (socket style coding-system dont-close)  (defun accept-connections (socket style coding-system dont-close)
880    (let* ((ef (find-external-format-or-lose coding-system))    (let ((client (unwind-protect
881           (client (unwind-protect                       (accept-connection socket :external-format nil
882                        (accept-connection socket :external-format nil                                                 :buffering t)
883                                           :buffering t)                    (unless dont-close
884                     (unless dont-close                      (close-socket socket)))))
                      (close-socket socket)))))  
885      (authenticate-client client)      (authenticate-client client)
886      (serve-requests (make-connection socket client style coding-system))))      (serve-requests (make-connection socket client style coding-system))))
887    
# Line 931  DEDICATED-OUTPUT INPUT OUTPUT IO REPL-RE Line 929  DEDICATED-OUTPUT INPUT OUTPUT IO REPL-RE
929                                      "Abort reading input from Emacs.")                                      "Abort reading input from Emacs.")
930                  (read-user-input-from-emacs)))))                  (read-user-input-from-emacs)))))
931           (dedicated-output (if *use-dedicated-output-stream*           (dedicated-output (if *use-dedicated-output-stream*
932                                 (open-dedicated-output-stream                                 (open-dedicated-output-stream connection)))
                                 (connection.socket-io connection))))  
933           (in (make-input-stream input-fn))           (in (make-input-stream input-fn))
934           (out (or dedicated-output           (out (or dedicated-output
935                    (make-output-stream (make-output-function connection))))                    (make-output-stream (make-output-function connection))))
# Line 981  DEDICATED-OUTPUT INPUT OUTPUT IO REPL-RE Line 978  DEDICATED-OUTPUT INPUT OUTPUT IO REPL-RE
978    "Create a stream that sends output to a specific TARGET in Emacs."    "Create a stream that sends output to a specific TARGET in Emacs."
979    (make-output-stream (make-output-function-for-target connection target)))    (make-output-stream (make-output-function-for-target connection target)))
980    
981  (defun open-dedicated-output-stream (socket-io)  (defun open-dedicated-output-stream (connection)
982    "Open a dedicated output connection to the Emacs on SOCKET-IO.    "Open a dedicated output connection to the Emacs on SOCKET-IO.
983  Return an output stream suitable for writing program output.  Return an output stream suitable for writing program output.
984    
# Line 990  This is an optimized way for Lisp to del Line 987  This is an optimized way for Lisp to del
987                                 *dedicated-output-stream-port*)))                                 *dedicated-output-stream-port*)))
988      (unwind-protect      (unwind-protect
989           (let ((port (local-port socket)))           (let ((port (local-port socket)))
990             (encode-message `(:open-dedicated-output-stream ,port) socket-io)             (encode-message `(:open-dedicated-output-stream
991                                 ,port
992                                 ,(connection.coding-system connection))
993                               (connection.socket-io connection))
994             (let ((dedicated (accept-connection             (let ((dedicated (accept-connection
995                               socket                               socket
996                               :external-format                               :external-format
997                               (or (ignore-errors                               (or (find-external-format
998                                     (stream-external-format socket-io))                                    (connection.coding-system connection))
999                                   :default)                                   :default)
1000                               :buffering *dedicated-output-stream-buffering*                               :buffering *dedicated-output-stream-buffering*
1001                               :timeout 30)))                               :timeout 30)))

Legend:
Removed from v.1.758  
changed lines
  Added in v.1.759

  ViewVC Help
Powered by ViewVC 1.1.5