[slime-devel] patch for swank-sbcl.lisp

Sergey Kolos sergey.kolos at gmail.com
Tue Jul 3 00:05:12 UTC 2007


When compile string is called with sbcl, slime creates a temporary file in (user
folder folder) (c:\ under windows). However it probably should be in tmp folder.
(In particular on my windows machine I don't have permission to write to c:\
folder, so this compilation procedure fails).

With this patch, if TEMP environment variable is defined, temporary files are
created in folder specified by TEMP environment variable.

Here is patch:

Index: swank-sbcl.lisp
===================================================================
--- swank-sbcl.lisp	(revision 54)
+++ swank-sbcl.lisp	(working copy)
@@ -411,11 +411,14 @@
 (sb-alien:define-alien-routine "tmpnam" sb-alien:c-string
   (dest (* sb-alien:c-string)))
 
+(defparameter *temp-folder* (sb-posix:getenv "TEMP"))
+
 (defun temp-file-name ()
   "Return a temporary file name to compile strings into."
-  (concatenate 'string (tmpnam nil) ".lisp"))
+  (concatenate 'string *temp-folder* (tmpnam nil) ".lisp"))





More information about the slime-devel mailing list