[slime-devel] patch: Add ABORT restart in HANDLE-REQUEST

Luke Gorrie luke at synap.se
Fri Oct 20 09:02:49 UTC 2006


Howdy!

There's a problem in at least CLISP that if you type something stupid
in the REPL and then press 'a' in the debugger you lose the SLIME
connection. This is because the ABORT restart is way way way up the
stack and invoking it throws the connection away.

The simple fix is to add an ABORT restart in the same place as
ABORT-REQUEST. Yes?

Index: swank.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank.lisp,v
retrieving revision 1.409
diff -u -p -u -r1.409 swank.lisp
--- swank.lisp        20 Oct 2006 00:14:07 -0000        1.409
+++ swank.lisp        20 Oct 2006 09:01:06 -0000
@@ -566,8 +566,9 @@ of the toplevel restart."
   (assert (null *swank-state-stack*))
   (let ((*swank-state-stack* '(:handle-request)))
     (with-connection (connection)
-      (with-simple-restart (abort-request "Abort handling SLIME request.")
-        (read-from-emacs)))))
+      (with-simple-restart (abort "Abort handling SLIME request.")
+        (with-simple-restart (abort-request "Abort handling SLIME request.")
+          (read-from-emacs))))))
 
 (defun current-socket-io ()
   (connection.socket-io *emacs-connection*))





More information about the slime-devel mailing list