[slime-cvs] CVS update: slime/swank-source-path-parser.lisp

Helmut Eller heller at common-lisp.net
Wed May 11 14:45:20 UTC 2005


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

Modified Files:
	swank-source-path-parser.lisp 
Log Message:
(read-and-record-source-map): Ensure that at least the toplevel form
is in the source-map.

Date: Wed May 11 16:45:20 2005
Author: heller

Index: slime/swank-source-path-parser.lisp
diff -u slime/swank-source-path-parser.lisp:1.13 slime/swank-source-path-parser.lisp:1.14
--- slime/swank-source-path-parser.lisp:1.13	Fri Apr  1 15:59:48 2005
+++ slime/swank-source-path-parser.lisp	Wed May 11 16:45:20 2005
@@ -64,8 +64,14 @@
 subexpressions of the object to stream positions."
   (let* ((*source-map* (make-hash-table :test #'eq))
          (*readtable* (make-source-recording-readtable *readtable* 
-						       *source-map*)))
-    (values (read stream) *source-map*)))
+						       *source-map*))
+	 (start (file-position stream))
+	 (form (read stream))
+	 (end (file-position stream)))
+    ;; ensure that at least FORM is in the source-map
+    (unless (gethash form *source-map*)
+      (push (cons start end) (gethash form *source-map*)))
+    (values form *source-map*)))
 
 (defun read-source-form (n stream)
   "Read the Nth toplevel form number with source location recording.




More information about the slime-cvs mailing list