Next: , Previous: , Up: Setup Tuning   [Contents][Index]

2.5.2 Multiple Lisps

By default, the command M-x slime starts the program specified with inferior-lisp-program. If you invoke M-x slime with a prefix argument, Emacs prompts for the program which should be started instead. If you need that frequently or if the command involves long filenames it’s more convenient to set the slime-lisp-implementations variable in your .emacs. For example here we define two programs:

(setq slime-lisp-implementations
      '((cmucl ("cmucl" "-quiet"))
        (sbcl ("/opt/sbcl/bin/sbcl") :coding-system utf-8-unix)))

This variable holds a list of programs and if you invoke SLIME with a negative prefix argument, M-- M-x slime, you can select a program from that list. When called without a prefix, either the name specified in slime-default-lisp, or the first item of the list will be used. The elements of the list should look like


is a symbol and is used to identify the program.


is the filename of the program. Note that the filename can contain spaces.


is a list of command line arguments.


the coding system for the connection. (see slime-net-coding-system)x


should be a function which takes two arguments: a filename and a character encoding. The function should return a Lisp expression as a string which instructs Lisp to start the Swank server and to write the port number to the file. At startup, SLIME starts the Lisp process and sends the result of this function to Lisp’s standard input. As default, slime-init-command is used. An example is shown in Loading Swank faster.


should be a function which takes no arguments. It is called after the connection is established. (See also slime-connected-hook.)


specifies a list of environment variables for the subprocess. E.g.

(sbcl-cvs ("/home/me/sbcl-cvs/src/runtime/sbcl"
           "--core" "/home/me/sbcl-cvs/output/sbcl.core")
          :env ("SBCL_HOME=/home/me/sbcl-cvs/contrib/"))

initializes SBCL_HOME in the subprocess.

Next: , Previous: , Up: Setup Tuning   [Contents][Index]