[slime-devel] patch for a glitch in swank-sbcl.lisp

Philipp Matthias Schäfer philipp.schaefer at gmail.com
Wed Mar 25 23:14:17 UTC 2009


Hi,

I slime-compile-and-load-file'ed a buffer which contains an expression

  (load (compile "otherfile.lisp"))

and the compilation of the buffer itself worked flawlessly, about which
the minibuffer informed me correctly. However since I had my slime-repl
buffer not in the foreground I didn't notice that the compilation of
otherfile.lisp actually failed.

Looking at the source for my backend (sbcl) I noticed that the
swank-compile-file function in swank-sbcl.lisp returns just nil in the
event of a sb-c:fatal-compiler-error condition, whereas normally the
function returns true as a third value in case the compilation did not
succeed. This is a problem, since compile-file-for-emacs which
calls swank-compile now gets the default value nil as a third return value,
which is supposed to signify success.

The following patch fixes the problem, that is, a buffer with the
debugger is presented to me, which is the same behavior I get when
calling slime-load-file after slime-compile-file.


--- swank-sbcl.lisp     7 Mar 2009 19:08:03 -0000       1.237
+++ swank-sbcl.lisp     25 Mar 2009 21:02:23 -0000
@@ -512,7 +512,7 @@
                       (source-cache-get input-file 
                                         (file-write-date input-file))
                       (not (load output-file))))))
-    (sb-c:fatal-compiler-error () nil)))
+    (sb-c:fatal-compiler-error () (value nil nil t))))
 
 ;;;; compile-string


Regards.

Philipp






More information about the slime-devel mailing list