[slime-devel] Detecting inferior lisp

Helmut Eller heller at common-lisp.net
Mon Sep 20 08:06:09 UTC 2010


* Ilya Sterin [2010-09-17 03:27] writes:

> I'm using slime with both sbcl and clojure.  In clojure I'm running a
> swank clojure server and using slime-connect to connect to it.  I have
> different options that need to be set like (slime-setup ...) depending
> on whether I'm connected to sbcl or clojure.

slime-setup is usually executed in .emacs before connecting, so its a
bit difficult.  Also enabling certain contribs for only some Lisps is
not well supported.

> For now I have defined two functions, slime-sbcl and slime-clojure and
> all happens there, but I'm wondering if there is some sort of a hook
> and predicate I can use in order to assert the inferior lisp at
> runtime.

slime-connected-hook, that is run after connecting but is run for every
connection.  slime-lisp-implementation-name or
slime-lisp-implementation-type could be used to detect what kind of Lisp
you are connected to.

Alternatively you can use the :init-function argument with
slime-lisp-implementations or slime-start.

Helmut





More information about the slime-devel mailing list