Getting SLIME to work with Corman Lisp 2.51
What you'll need
- Corman Common Lisp 2.51
- SLIME version 1.2.1 or later. CVS HEAD now has these changes integrated.
- My patches for Corman Lisp — you will need all the patches and packages (except the patch for
parse-c-decls.lisp), so the easiest way to go is to download all-patches.zip.
What to do
1. Prepare a lisp image
To maximize startup speed, I recommend that you create a custom image for SLIME with most of the necessary code loaded. Here's the procedure:
- Start
clconsole - Load load-bits.lisp
- Save the image (using
save-image) — I usually call itswank.img.
I don't recommend preloading the actual swank code, in
order to easily pick up changes in that code. If that doesn't bother
you, execute
(load "/path/to/swank-loader.lisp") before the save-image— but remember to patch SLIME first!
2. Patch SLIME
If your copy of SLIME includes a file named swank-corman.lisp (which it will if it is dated later than 2005-06-01), you may skip this step.
Grab swank-corman.lisp and swank-corman-patches.patch and put them in your SLIME directory.
Apply the patch (patch < swank-corman-patches.patch). If you do not have the patch utility, it is fairly easy to apply the patch manually. If you cannot or will not do this, contact me and I can provide pre-patched files.
3. Configure your .emacs
Follow the SLIME setup instructions.
Be aware that if your Corman Lisp installation directory
includes spaces in any directory names (as the default does) you must
use the old-style 8.3 names in inferior-lisp-program. It
may be a good idea to install Corman Lisp in a directory without
spaces instead.
4. Test
Type M-x slime in emacs. After a little
while you should be greeted with the SLIME prompt. Note that
compilation of swank sometimes randomly fails; if this happens to you,
just M-x slime-abort-connection, M-x
comint-kill-subjob and try again.
If you cannot get M-x slime to work, try
the following:
- Start Corman Lisp with the image you created in
step 1. (I do
\path\to\corman\lisp\clconsole -image swank.img). - Load swank (
(load "/path/to/swank-loader.lisp")). If your image includes a preloaded swank you'll want to skip this step. - Execute
(swank:create-server). This should print;; Swank started at port: 4005. - You should now be able to do a
M-x slime-connect RET RETin your emacs, and be greeted by SLIME.
If that didn't work either, you should have gotten some error messages. Send them either to me or to the SLIME mailing list, and we will try to help you.
What works?
- Basic editing and evaluation
- The REPL works, indentation is correct and
C-M-xworks. - Arglist display
- Compilation
- Loading files
- Apropos and describe
- Most debugger functionality
- Inspector
What's missing
- Interrupting
- Some debugger functionality
-
- Some frame-related stuff (restart and return-from most obviously)
- Stepping
- Tracing
- Breakpoints
- XREF
- Profiling
- More sophisticated communication styles
:spawnlooks to be doable.