[slime-devel] CMUCL: how to start slime in cl-user
Stas Boukarev
stassats at gmail.com
Sun May 17 21:58:42 UTC 2009
"N. Raghavendra" <raghu at mri.ernet.in> writes:
> Slime with CMUCL starts the Slime REPL in the `swank' package, and the
> inferior lisp in the `cl-user' package. Is there a way to get the Slime
> REPL also to start CMUCL in the `cl-user' package? I've tried without
> success
>
> (defun nr-cmucl-init-command (port-filename coding-system)
> "Return a string to initialize CMUCL.
> This is a modified version of `slime-init-command' from `slime.el'."
> (let ((loader (if (file-name-absolute-p slime-backend)
> slime-backend
> (concat slime-path slime-backend)))
> (encoding (slime-coding-system-cl-name coding-system)))
> (format "%S\n\n"
> `(progn
> (load ,(expand-file-name loader) :verbose t)
> (funcall (read-from-string "swank-loader:init"))
> (funcall (read-from-string "swank:start-server")
> ,port-filename
> :coding-system ,encoding)
> (in-package "CL-USER")))))
>
> (setq slime-lisp-implementations
> '((cmucl ("/opt/bin/lisp") :init nr-cmucl-init-command)))
>
In order to load contribs, slime asynchronously evaluates swank-require, in
the process of loading them something rebinds *package*. It happens that
slime-repl-connected-hook-function gets called and executed at the
moment when something changes *package* to SWANK.
Solution is either not to load contribs asynchronously:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slime-cmucl.diff
Type: text/x-diff
Size: 628 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/slime-devel/attachments/20090518/d88f5ccf/attachment.diff>
-------------- next part --------------
or set communication style to :spawn, which will create separate thread
for each request, by putting
#+cmu (setf swank:*communication-style* :spawn)
into ~/.swank.lisp
--
With best regards, Stas.
More information about the slime-devel
mailing list