[slime-cvs] CVS update: slime/swank-source-file-cache.lisp

Helmut Eller heller at common-lisp.net
Mon Mar 21 17:40:12 UTC 2005


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

Modified Files:
	swank-source-file-cache.lisp 
Log Message:
(read-snippet): Take the start position as optional argument.
Date: Mon Mar 21 18:40:11 2005
Author: heller

Index: slime/swank-source-file-cache.lisp
diff -u slime/swank-source-file-cache.lisp:1.2 slime/swank-source-file-cache.lisp:1.3
--- slime/swank-source-file-cache.lisp:1.2	Sun Mar 13 04:01:30 2005
+++ slime/swank-source-file-cache.lisp	Mon Mar 21 18:40:10 2005
@@ -85,8 +85,11 @@
 the definitions looks like, so that it can accurately find them by
 text search.")
 
-(defun read-snippet (stream)
-  "Read a string of upto *SOURCE-SNIPPET-SIZE* characters from STREAM."
+(defun read-snippet (stream &optional position)
+  "Read a string of upto *SOURCE-SNIPPET-SIZE* characters from STREAM.
+If POSITION is given, set the STREAM's file position first."
+  (when position
+    (file-position stream position))
   #+SBCL (skip-comments-and-whitespace stream)
   (read-upto-n-chars stream *source-snippet-size*))
 




More information about the slime-cvs mailing list