In ABCL, during development I sometimes get runaway functions. I want to be able to stop execution and return to top level LISP without killing the LISP/JVM process (in my emacs shell) and losing my current LISP environment.
I've tried various control keys (e.g., Control-C, Control-D,...) but at best end up killing LISP or the JVM.
;;; How to stop this function and return to LISP interactive
;;; without killing lisp...?
(defun runaway ()
(let ((result nil))
(dotimes (count 10 result)
(sleep 2)
(print count))))
C-c C-cTerminate batch job (Y/N)? n n
Process inferior-lisp exited abnormally with code 130
Try using Emacs with Slime instead, because Slime does not kill the process but interrupt the thread and enters the debugger if you press C-c C-c.
You should probably add an executable script
abcl.sh
somewhere in your PATH, as follows:You have to replace
...
with your own path toabcl.jar
.Then, from Emacs, you should be able to start it.
Do C-u M-x slime to force the
slime
command to prompt for an executable, and giveabcl.sh
to it. It should start the process and connect to it using the Slime protocol.