[slime-devel] Using Allegro 6.2 for Windows with Slime

Matthew Danish mrd+nospam at cmu.edu
Wed Aug 4 18:40:55 UTC 2004


I've noticed a few ad-hoc snippets of code to connect Slime to Allegro
on Windows, and I thought that I should contribute my own.

The primary advantage of this code is that it does not use a fixed
port, but rather makes use of the existing Slime infrastructure to
communicate a port number through a temporary file.  Also, as a
result, Slime will automatically attempt to retry connecting when it
fails, which is better than having to worry about race conditions and
timing issues.


file load-slime.el:

;; This code derived from the Lisp in a Box project, hence the variable
;; names.  The license for the project is the GPL.

(defvar lispbox-base-path "c:/lisp")    ; or wherever

(defvar path-to-slime (concat lispbox-base-path "/slime"))
(add-to-list 'load-path path-to-slime)
(require 'slime)
(slime-setup)

(defun lispbox-start-allegro-6.2 ()
  (let ((runallegro-path
         (concat lispbox-base-path "/Allegro62/RunAllegro.bat")))
    (delete-other-windows)
    (shell-command (format "\"%s\" %s &"
                           runallegro-path
                           (slime-swank-port-file)))
    (slime-read-port-and-connect-to-running-swank nil)
    (add-hook 'kill-emacs-hook (lambda () (slime-repl-sayoonara)))))



file (concat lispbox-base-path "/Allegro62/RunAllegro.bat"):

@ECHO OFF
C:
CD "\lisp"
"C:\acl62\alisp.exe" +B +cm -L "C:/lisp/slime/swank-loader.lisp" -e '(swank:start-server "%1")'


Paths may have to be fiddled with, as appropriate.

-- 
; Matthew Danish <mdanish at andrew.cmu.edu>
; OpenPGP public key: C24B6010 on keyring.debian.org





More information about the slime-devel mailing list