[slime-cvs] CVS slime

CVS User nsiivola nsiivola at common-lisp.net
Thu Jun 16 08:28:45 UTC 2011


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv24436

Modified Files:
	ChangeLog swank-sbcl.lisp 
Log Message:
sbcl: compiling from buffer tmpfile directory can be a symlink

 ...so need to PROBE-FILE to make sure the pathnames match before
 comparison.


--- /project/slime/cvsroot/slime/ChangeLog	2011/06/14 15:34:18	1.2201
+++ /project/slime/cvsroot/slime/ChangeLog	2011/06/16 08:28:45	1.2202
@@ -1,3 +1,9 @@
+2011-06-16  Nikodemus Siivola  <nikodemus at random-state.net>
+
+	* swank-sbcl.lisp (compiling-from-buffer-p): PROBE-FILE to
+	handle cases there the tmp-directory is a symlink.
+	(compiling-from-file-p): Ditto.
+
 2011-06-14  Nikodemus Siivola  <nikodemus at random-state.net>
 
 	* swank-backend.lisp (call-with-io-timeout): New DEFINTERFACE.
--- /project/slime/cvsroot/slime/swank-sbcl.lisp	2011/06/14 15:34:18	1.283
+++ /project/slime/cvsroot/slime/swank-sbcl.lisp	2011/06/16 08:28:45	1.284
@@ -495,13 +495,20 @@
        ;; The following is to trigger COMPILING-FROM-GENERATED-CODE-P
        ;; in LOCATE-COMPILER-NOTE, and allows handling nested
        ;; compilation from eg. hitting C-C on (eval-when ... (require ..))).
+       ;;
+       ;; PROBE-FILE to handle tempfile directory being a symlink.
        (pathnamep filename)
-       (string= (namestring filename) *buffer-tmpfile*)))
+       (let ((true1 (probe-file filename))
+             (true2 (probe-file *buffer-tmpfile*)))
+         (and true1 (equal true1 true2)))))
 
 (defun compiling-from-file-p (filename)
   (and (pathnamep filename)
        (or (null *buffer-name*)
-           (string/= (namestring filename) *buffer-tmpfile*))))
+           (null *buffer-tmpfile*)
+           (let ((true1 (probe-file filename))
+                 (true2 (probe-file *buffer-tmpfile*)))
+             (not (and true1 (equal true1 true2)))))))
 
 (defun compiling-from-generated-code-p (filename source)
   (and (eq filename :lisp) (stringp source)))





More information about the slime-cvs mailing list