Permalink
Browse files

guard agains source path mapping hitting reader errors

  Example: compile (defun foo () (bar)) in a file. Edit
  the definition to look like (defun foo () (nopackage:bar)),
  close the file and hit M-. foo. Prior to this an error shows
  in the minibuffer, and nothing else happens.
  • Loading branch information...
1 parent 1bbc6b7 commit 5d7637827a80b39d03ed8773f93f9720a161a62e nsiivola committed May 19, 2009
Showing with 8 additions and 1 deletion.
  1. +7 −0 ChangeLog
  2. +1 −1 swank-source-path-parser.lisp
View
@@ -1,3 +1,10 @@
+2009-05-19 Nikodemus Siivola <nikodemus@random-state.net>
+
+ * swank-source-path-parser.lisp (read-and-record-source-map):
+ ignore errors during the call to READ, so that we don't the
+ current version of the form we are looking at contains eg.
+ uninternable symbols.
+
2009-05-19 Helmut Eller <heller@common-lisp.net>
* swank-openmcl.lisp (source-note-to-source-location): Always
@@ -80,7 +80,7 @@ subexpressions of the object to stream positions."
(let* ((source-map (make-hash-table :test #'eq))
(*readtable* (make-source-recording-readtable *readtable* source-map))
(start (file-position stream))
- (form (read stream))
+ (form (ignore-errors (read stream)))
(end (file-position stream)))
;; ensure that at least FORM is in the source-map
(unless (gethash form source-map)

0 comments on commit 5d76378

Please sign in to comment.