[slime-cvs] CVS slime/contrib

CVS User heller heller at common-lisp.net
Sun Nov 27 19:24:34 UTC 2011


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

Modified Files:
	ChangeLog slime-repl.el 
Log Message:
* swank.lisp (create-server): Remove coding-system argument.
([defstruct] connection): Remove coding-system slot.
(connection.external-format, *coding-system*): Deleted.
(make-connection, start-server, create-server, setup-server)
(accept-connections): Drop coding-system arg.

(connection-info): Return supported coding systems.
(create-repl, open-dedicated-output-stream)
(open-streams, initialize-streams-for-connection): Add
coding-system arg.

* slime.el (slime-init-command): Ignore the coding-system arg.
(slime-connection-coding-systems): New connection variable.
(slime-set-connection-info): Set it.

--- /project/slime/cvsroot/slime/contrib/ChangeLog	2011/11/23 00:56:01	1.508
+++ /project/slime/cvsroot/slime/contrib/ChangeLog	2011/11/27 19:24:33	1.509
@@ -1,3 +1,8 @@
+2011-11-27  Helmut Eller  <heller at common-lisp.net>
+
+	* slime-repl.el (slime-repl-choose-coding-system): New.
+	(slime-repl-connected-hook-function): Use it.
+
 2011-11-23  Stas Boukarev  <stassats at gmail.com>
 
 	* slime-repl.el (slime-open-stream-to-lisp): Convert "utf-8-unix"
--- /project/slime/cvsroot/slime/contrib/slime-repl.el	2011/11/23 00:56:01	1.59
+++ /project/slime/cvsroot/slime/contrib/slime-repl.el	2011/11/27 19:24:34	1.60
@@ -1659,10 +1659,21 @@
            (pop-to-buffer repl-buffer)
            (goto-char (point-max))))))
 
+(defun slime-repl-choose-coding-system ()
+  (let ((candidates (slime-connection-coding-systems)))
+    (or (find (symbol-name (car default-process-coding-system))
+	      candidates
+	      :test (lambda (s1 s2)
+		      (if (fboundp 'coding-system-equal)
+			  (coding-system-equal (intern s1) (intern s2)))))
+	(car candidates)
+	(error "Can't find suitable coding-system"))))
+
 (defun slime-repl-connected-hook-function ()
   (destructuring-bind (package prompt) 
-      (let ((slime-current-thread t))
-	(slime-eval '(swank:create-repl nil)))
+      (let ((slime-current-thread t)
+	    (cs (slime-repl-choose-coding-system)))
+	(slime-eval `(swank:create-repl nil :coding-system ,cs)))
     (setf (slime-lisp-package) package)
     (setf (slime-lisp-package-prompt-string) prompt))
   (slime-hide-inferior-lisp-buffer)





More information about the slime-cvs mailing list