Bill Clementson's Blog

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

March 2004
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
Feb  Apr

Configuring SLIME for 3 Win32 CL Implementations

Saturday, March 6, 2004

So far, I've gotten ACL, LispWorks, and CLISP to all work with SLIME on MS Windows. For anyone else who wants to try out SLIME on Win32 with one of these CL implementations, here is a step-by-step summary (the directory locations that I used were HOME=c:/usr/home and BIN=c:/bin).

To set up:

  1. Download the CVS version of SLIME to HOME/site/slime:
    cvs -d :pserver:anonymous@common-lisp.net:/project/slime/cvsroot login
    # Password is "anonymous"
    cvs -d :pserver:anonymous@common-lisp.net:/project/slime/cvsroot checkout slime
  2. Download & install the Lisp implementation you want to use in the BIN directory (see the CL Cookbook instructions if you need help doing this)
  3. Create a file called ".slime.lisp" in your HOME directory with the following contents:
  4. (load "c:/usr/home/site/slime/swank-loader.lisp")
    #-clisp (swank::create-swank-server 4005 :spawn #'swank::simple-announce-function t)
    #+clisp (swank::create-swank-server 4005)
    
  5. Add the following code to your .emacs file:
;;__________________________________________________________________________
;;;; SLIME Setup

(setq load-path (append (list "c:/usr/home/site/slime")
                        load-path))
(require 'slime)
(add-hook 'lisp-mode-hook (lambda () (slime-mode t)))
(add-hook 'inferior-lisp-mode-hook (lambda () (inferior-slime-mode t)))
;; If you don't want eldoc-like behavior, comment out the following line
(slime-autodoc-mode)

;; These are the 3 CL implementations that currently work with SLIME/Win32: ;; (Note: Unless you want to try out all 3, you only need one of these functions) ;; Franz Allegro Common Lisp - http://www.franz.com (defun acl-start () (interactive) (shell-command "c:/bin/acl-6.2/alisp.exe +B +cm -L ~/.slime.lisp&")) ;; GNU CLISP - http://clisp.cons.org/ (defun clisp-start () (interactive) (shell-command (concat "c:/bin/clisp-2.32/full/lisp.exe " "-B c:/bin/clisp-2.32/full/ " "-M c:/bin/clisp-2.32/full/lispinit.mem " "-i c:/usr/home/.slime.lisp " "-ansi -q&"))) ;; Xanalys LispWorks - http://www.lispworks.com (defun lw-start () (interactive) (shell-command (concat "c:/bin/lispworks-4.3/lispworks-personal-4300.exe " "-init c:/usr/home/.slime.lisp&"))) ;;__________________________________________________________________________
To use:
  1. Start the CL first with "M-x acl-start" (or equivalent) from Emacs (Note: The LispWorks Personal version doesn't have support for init files. Therefore, it is necessary to manually enter (load "c:/usr/home/.slime.lisp") into LispWorks after it has started)
  2. Start the SLIME connection with "M-x slime-connect RET RET RET" from Emacs
That's it! Let me know if you have any problems with these instructions.

emacs Copyright © 2004 by Bill Clementson