Clementson's Blog

Bits and pieces (mostly Lisp-related) that I collect from the ether.

January 2005
Sun Mon Tue Wed Thu Fri Sat
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
Dec  Feb

LispWorks Professional/Enterprise with Emacs/SLIME on Win32

Thursday, January 6, 2005

I have previously mentioned how it is possible to configure LispWorks Personal (the trial version of LispWorks) for use with SLIME. The same approach can be used to configure the Professional/Enterprise versions of LispWorks if you want to make use of both the LispWorks IDE and Emacs/SLIME. However, I usually prefer to work entirely within Emacs/SLIME and don't use the LispWorks IDE at all. In that scenario, the LispWorks IDE is just extra "clutter". So, I usually run LispWorks configured to run in "console mode" so that the LispWorks IDE is not brought up; however, this does need a little bit of setup as there is no "console mode" LispWorks executable shipped with the software. To do this, you need to do something similar to this:

  1. Create a Lisp source file called "console.lisp" with the following contents:
    (load-all-patches)
    (save-image "lw-console" :console t 
                             :restart-function 'mp:initialize-multiprocessing 
                             :environment nil)
    (quit)
  2. From a DOS command line, type the following commands (adjust the directory locations as necessary, of course):
    cd c:\bin\lispworks-4.4\
    lispworks-4400 -init c:\usr\home\lisp\console.lisp
    This will create a console version of the LispWorks executable called "lw-console.exe" in the LispWorks installation directory.
  3. Create a file called ".slime.lisp" in your HOME directory. Put the following in it:
    #+lispworks
    (progn (mp:initialize-multiprocessing)
           (swank:create-swank-server 4005
    				  swank::*communication-style*
    				  #'swank::simple-announce-function
    				  t))
  4. In addition to the normal stuff you put in your .emacs file for SLIME, add the following function:
    (defun lw ()
      (interactive)
      (setq inferior-lisp-program (concat bin-dir "lispworks-4.4/lw-console.exe"
    				      " -init " home-dir ".slime.lisp"))
      (load "slime"))
Now, to start LispWorks, you just need to do:
"M-x lw"
"M-x slime"
and you've got a SLIME REPL without the LispWorks IDE!

emacs Copyright © 2005 by Bill Clementson