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

Diff of /slime/swank.lisp

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

revision 1.412 by mkoeppe, Sat Oct 28 17:42:19 2006 UTC revision 1.413 by mbaringer, Mon Oct 30 16:25:28 2006 UTC
# Line 24  Line 24 
24             #:run-after-init-hook             #:run-after-init-hook
25             ;; These are user-configurable variables:             ;; These are user-configurable variables:
26             #:*communication-style*             #:*communication-style*
27               #:*dont-close*
28             #:*log-events*             #:*log-events*
29             #:*log-output*             #:*log-output*
30             #:*use-dedicated-output-stream*             #:*use-dedicated-output-stream*
# Line 405  Useful for low level debugging." Line 406  Useful for low level debugging."
406    
407  (defvar *communication-style* (preferred-communication-style))  (defvar *communication-style* (preferred-communication-style))
408    
409    (defvar *dont-close* nil
410      "Default value of :dont-close argument to start-server and
411      create-server.")
412    
413  (defvar *dedicated-output-stream-buffering*  (defvar *dedicated-output-stream-buffering*
414    (if (eq *communication-style* :spawn) :full :none)    (if (eq *communication-style* :spawn) :full :none)
415    "The buffering scheme that should be used for the output stream.    "The buffering scheme that should be used for the output stream.
416  Valid values are :none, :line, and :full.")  Valid values are :none, :line, and :full.")
417    
418  (defun start-server (port-file &key (style *communication-style*)  (defun start-server (port-file &key (style *communication-style*)
419                       dont-close (external-format *coding-system*))                                      (dont-close *dont-close*)
420                                        (external-format *coding-system*))
421    "Start the server and write the listen port number to PORT-FILE.    "Start the server and write the listen port number to PORT-FILE.
422  This is the entry point for Emacs."  This is the entry point for Emacs."
423    (flet ((start-server-aux ()    (flet ((start-server-aux ()
# Line 424  This is the entry point for Emacs." Line 430  This is the entry point for Emacs."
430    
431  (defun create-server (&key (port default-server-port)  (defun create-server (&key (port default-server-port)
432                        (style *communication-style*)                        (style *communication-style*)
433                        dont-close (external-format *coding-system*))                        (dont-close *dont-close*) (external-format *coding-system*))
434    "Start a SWANK server on PORT running in STYLE.    "Start a SWANK server on PORT running in STYLE.
435  If DONT-CLOSE is true then the listen socket will accept multiple  If DONT-CLOSE is true then the listen socket will accept multiple
436  connections, otherwise it will be closed after the first."  connections, otherwise it will be closed after the first."
# Line 1213  converted to lower case." Line 1219  converted to lower case."
1219    
1220  (defslimefun connection-info ()  (defslimefun connection-info ()
1221    "Return a key-value list of the form:    "Return a key-value list of the form:
1222  \(&key PID STYLE LISP-IMPLEMENTATION MACHINE FEATURES PACKAGE)  \(&key PID STYLE LISP-IMPLEMENTATION MACHINE FEATURES PACKAGE WIRE-PROTOCOL-VERSION)
1223  PID: is the process-id of Lisp process (or nil, depending on the STYLE)  PID: is the process-id of Lisp process (or nil, depending on the STYLE)
1224  STYLE: the communication style  STYLE: the communication style
1225  LISP-IMPLEMENTATION: a list (&key TYPE NAME VERSION)  LISP-IMPLEMENTATION: a list (&key TYPE NAME VERSION)
1226  FEATURES: a list of keywords  FEATURES: a list of keywords
1227  PACKAGE: a list (&key NAME PROMPT)"  PACKAGE: a list (&key NAME PROMPT)
1228    WIRE-PROTOCOL-VERSION: a number"
1229    (setq *slime-features* *features*)    (setq *slime-features* *features*)
1230    `(:pid ,(getpid) :style ,(connection.communication-style *emacs-connection*)    `(:pid ,(getpid) :style ,(connection.communication-style *emacs-connection*)
1231      :lisp-implementation (:type ,(lisp-implementation-type)      :lisp-implementation (:type ,(lisp-implementation-type)
# Line 1229  PACKAGE: a list (&key NAME PROMPT)" Line 1236  PACKAGE: a list (&key NAME PROMPT)"
1236                :version ,(machine-version))                :version ,(machine-version))
1237      :features ,(features-for-emacs)      :features ,(features-for-emacs)
1238      :package (:name ,(package-name *package*)      :package (:name ,(package-name *package*)
1239                :prompt ,(package-string-for-prompt *package*))))                :prompt ,(package-string-for-prompt *package*))
1240        :wire-protocol-version ,(wire-protocol-version)))
1241    
1242  (defslimefun io-speed-test (&optional (n 5000) (m 1))  (defslimefun io-speed-test (&optional (n 5000) (m 1))
1243    (let* ((s *standard-output*)    (let* ((s *standard-output*)
# Line 1246  PACKAGE: a list (&key NAME PROMPT)" Line 1254  PACKAGE: a list (&key NAME PROMPT)"
1254      (finish-output *trace-output*)      (finish-output *trace-output*)
1255      nil))      nil))
1256    
1257    (defun wire-protocol-version ()
1258      (let ((*package* (find-package :swank)))
1259        (load (merge-pathnames "swank-version.el" swank-loader::*source-directory*))
1260        (symbol-value '*swank-wire-protocol-version*)))
1261    
1262    
1263  ;;;; Reading and printing  ;;;; Reading and printing
1264    

Legend:
Removed from v.1.412  
changed lines
  Added in v.1.413

  ViewVC Help
Powered by ViewVC 1.1.5