[slime-cvs] CVS update: slime/swank-source-path-parser.lisp
Luke Gorrie
lgorrie at common-lisp.net
Fri Apr 1 13:59:50 UTC 2005
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv25699
Modified Files:
swank-source-path-parser.lisp
Log Message:
(check-source-path): Signal an error if a source path is malformed.
SBCL sometimes gives (NIL).
(source-path-stream-position): Use it.
Date: Fri Apr 1 15:59:49 2005
Author: lgorrie
Index: slime/swank-source-path-parser.lisp
diff -u slime/swank-source-path-parser.lisp:1.12 slime/swank-source-path-parser.lisp:1.13
--- slime/swank-source-path-parser.lisp:1.12 Fri Mar 18 23:34:34 2005
+++ slime/swank-source-path-parser.lisp Fri Apr 1 15:59:48 2005
@@ -78,9 +78,15 @@
(defun source-path-stream-position (path stream)
"Search the source-path PATH in STREAM and return its position."
+ (check-source-path path)
(destructuring-bind (tlf-number . path) path
(multiple-value-bind (form source-map) (read-source-form tlf-number stream)
(source-path-source-position (cons 0 path) form source-map))))
+
+(defun check-source-path (path)
+ (unless (and (consp path)
+ (every #'integerp path))
+ (error "The source-path ~S is not valid." path)))
(defun source-path-string-position (path string)
(with-input-from-string (s string)
More information about the slime-cvs
mailing list