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

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@andrew.cmu.edu> ; OpenPGP public key: C24B6010 on keyring.debian.org

I have just discovered that slime-read-port-and-connect-to-running-swank has been renamed to slime-read-port-and-connect in the beta. Making the simple substitution appears to work fine. On a related note, the slime-thread-attach function is still using the old name. -- ; Matthew Danish <mdanish@andrew.cmu.edu> ; OpenPGP public key: C24B6010 on keyring.debian.org
participants (2)
-
Luke Gorrie
-
Matthew Danish