[slime-cvs] CVS update: slime/swank-clisp.lisp

Helmut Eller heller at common-lisp.net
Fri Nov 19 19:05:51 UTC 2004


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv12746

Modified Files:
	swank-clisp.lisp 
Log Message:
(accept-connection): Accept :external-format as argument.
Date: Fri Nov 19 20:05:50 2004
Author: heller

Index: slime/swank-clisp.lisp
diff -u slime/swank-clisp.lisp:1.41 slime/swank-clisp.lisp:1.42
--- slime/swank-clisp.lisp:1.41	Fri Oct 29 00:12:22 2004
+++ slime/swank-clisp.lisp	Fri Nov 19 20:05:49 2004
@@ -151,13 +151,18 @@
 (defimplementation close-socket (socket)
   (socket:socket-server-close socket))
 
-(defimplementation accept-connection (socket)
+(defun find-encoding (external-format)
+  (ecase external-format
+    (:iso-latin-1-unix (ext:make-encoding :charset 'charset:iso-8859-1
+					  :line-terminator :unix))
+    (:utf-8-unix (ext:make-encoding :charset 'charset:utf-8
+				    :line-terminator :unix))))
+  
+(defimplementation accept-connection (socket &key external-format)
   (socket:socket-accept socket
 			:buffered nil ;; XXX should be t
 			:element-type 'character
-			:external-format (ext:make-encoding 
-					  :charset 'charset:iso-8859-1
-					  :line-terminator :unix)))
+			:external-format (find-encoding external-format)))
 
 ;;; Swank functions
 
@@ -491,7 +496,6 @@
 	   (with-condition-restarts condition (list (find-restart 'continue))
 				    (invoke-debugger condition)))))
    nil))
-
 
 ;;; Inspecting
 





More information about the slime-cvs mailing list