[Openmcl-devel] Slime's utf-8-unix
Ben Hyde
bhyde at pobox.com
Thu Oct 26 15:34:21 PDT 2006
Here's how I got openmcl's unicode support working with slime and
xemacs.
In my lisp init I modified the how it should fire up openmcl.
(setf slime-lisp-implementations
'((openmcl
("/Users/bhyde/bin/openmcl" "--terminal-encoding" "utf-8")
:coding-system utf-8-unix)
(sbcl
("sbcl")
:coding-system utf-8-unix)))
I also define a m-x command:
(defun openmcl () (interactive)
(let ((slime-default-lisp 'openmcl)) (slime)))
Then I taught swank that how to deal with swank's utf-8-unix coding-
system by replacing accept-connection's implementation in swank-
openmcl.lisp:
(defimplementation accept-connection (socket
&key external-format buffering
timeout)
(declare (ignore buffering timeout))
(let ((ef (or external-format :iso-latin-1-unix)))
(cond
((eq external-format :utf-8-unix)
(let ((ccl:*default-socket-character-encoding* :utf-8)
(ccl:*default-line-termination* :unix))
(ccl:accept-connection socket :wait t)))
(t
(assert (eq ef :iso-latin-1-unix))
(ccl:accept-connection socket :wait t)))))
I haven't tested this much, and presumably somebody who actually is
fluent in swank and openmcl external coding would have done something
different.
More information about the Openmcl-devel
mailing list