[slime-cvs] CVS update: slime/swank-cmucl.lisp

Luke Gorrie lgorrie at common-lisp.net
Sun Jul 4 03:22:37 UTC 2004


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

Modified Files:
	swank-cmucl.lisp 
Log Message:
(buffer-first-change): Suck the source file into the cache unless
already present. This is for M-. to increase the chances of our having
a copy of the sources corresponding with the loaded code. Should help
with the case where a user edits a file (without recompiling it) and
then M-.'s for one of its definitions.

Date: Sat Jul  3 20:22:37 2004
Author: lgorrie

Index: slime/swank-cmucl.lisp
diff -u slime/swank-cmucl.lisp:1.109 slime/swank-cmucl.lisp:1.110
--- slime/swank-cmucl.lisp:1.109	Sun Jun 27 08:00:37 2004
+++ slime/swank-cmucl.lisp	Sat Jul  3 20:22:37 2004
@@ -811,6 +811,16 @@
                  source)
                nil)))))
 
+(defun source-cached-p (filename)
+  "Is any version of FILENAME in the source cache?"
+  (if (gethash filename *source-file-cache*) t))
+
+(defimplementation buffer-first-change (filename)
+  "Load a file into the cache when the user modifies its buffer.
+This is a win if the user then saves the file and tries to M-. into it."
+  (unless (source-cached-p filename)
+    (ignore-errors (source-cache-get filename (file-write-date filename)))))
+
 
 ;;;; Finding definitions
 





More information about the slime-cvs mailing list