Some more SLIME features
Friday, March 5, 2004
I've been playing around with SLIME and have discovered a few more nice features that I don't think are currently documented on the CLiki web pages for SLIME ( here, here, here, and here):
- In addition to displaying the argument list for a function when you press SPACE after the function name, SLIME can be configured to behave in a manner similar to eldoc (e.g. - automatically displaying the argument list in the minibuffer when you cursor over a function). This is enabled by putting "(slime-autodoc-mode)" in your .emacs file after the "(require 'slime)" statement.
- You can create multiple REPL's in Emacs when using SLIME. If you started your Lisp implementation in the standard manner ("M-x slime"), this is done by just adding a prefix (e.g. - "C-u M-x slime"). However, even if you started your Lisp implementation manually (e.g. - as I described for ACL under Windows the other day), you can still manually create multiple REPL's. For example, if you've fired up a Lisp on port 4005 (the default for SLIME), you can just enter "(swank::create-swank-server 4006 :spawn #'swank::simple-announce-function t)" in the Lisp listener to start up another process. Then, in Emacs, you just do "(slime-connect "localhost" 4006)" and you've got another REPL in Emacs. This, of course, only works in Lisps that support multi-processing.
- You can select the *scratch* buffer using the "slime-scratch" command (also available off the "Evaluation" menu) and enter CL code and evaluate it just as you would normally do with Elisp code in the *scratch* buffer.
- There is an extensive set of cross reference commands (also available off the "Cross Reference" menu).

