Parent Directory | Revision Log
|Links to HEAD:||(view) (annotate)|
|Links to byte-stream:||(view) (annotate)|
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.
* swank-source-path-parser.lisp (make-source-recorder) (source-path-source-position): Adjust the file-position before entering it the table.
* swank-source-path-parser.lisp The source parser READs in files, and if such a file contains some nasty #. hackery that results in an error being signalled, M-. would fail on anything that's defined in those files. Fix that by using a special #. reader function that invokes the original #. reader with an IGNORE-ERRORS wrapped around. (make-sharpdot-reader): New function. (make-source-recording-readtable): Use it and install it on #. * slime.el (find-definition.2): New test case to guard against it.
* swank-source-path-parser.lisp: Multibyte characters in files could screw up compiler-notes highlighting on SBCL. Fix that. (skip-toplevel-forms): Abstracted out from READ-SOURCE-FORM. (source-path-file-position): Don't operate on the file stream directly, since CL:FILE-POSITION may not return character but binary offsets on such streams; instead slurp file content into a buffer string, and operate on that.
Fix source-path mapping for #+#.'(:and). Patch by Luis Oliveira. * swank-source-path-parser.lisp (make-source-recording-readtable): don't suppress the #. reader macro. (read-and-record-source-map): don't bind *read-eval* to nil. (suppress-sharp-dot): unused, delete it. * slime.el (test compile-defun): test with #+#.'(:and).
(suppress-sharp-dot): Return a unique symbol to avoid nil entries at toplevel in the source-map.
(make-source-recording-readtable): Suppress the #. reader-macro. (suppress-sharp-dot): New function. (read-source-form): Disable *read-eval*. (*source-map*): Deleted. We can do everything with a lexical variable.
Added public domain dedication.
(read-and-record-source-map): Ensure that at least the toplevel form is in the source-map.
(check-source-path): Signal an error if a source path is malformed. SBCL sometimes gives (NIL). (source-path-stream-position): Use it.
(make-source-recording-readtable): Ignore non-ascii chars.
(read-source-form): New function. Common code from source-path-stream-position and form-number-stream-position. (source-path-stream-position): Use it.
(source-path-stream-position): Bind *read-suppress* to nil before calling read-and-record-source-map.
(source-path-stream-position): Bind *read-suppress* only as long as we skip over forms. The last toplevel form in the path is read with *read-suppress* = nil because in newer versions of CMUCL and SBCL read will return nil if *read-suppress* is t.
Remove workarounds for SBCL bugs. The bugs are fixed in the versions we support.
Removed caching of readtables and the source-map hashtable. Fresh creation is ultra-cheap (<1ms). The caching didn't handle modifications to readtables and generally made me feel uneasy while tracking down an obscure bug in a reader macro. The cached source-map hashtable also wasn't thread-safe (ho hum).
(cmucl-style-get-macro-character): Add tests for #\space and #\\. (Suggested by Christophe Rhodes.)
(cmucl-style-get-macro-character): The feature is CMU not CMUCL.
(cmucl-style-get-macro-character): New function. Workaround for bug(?) in SBCL. (make-source-recording-readtable): Use it.
We are in-package :swank-backend. Thanks to Raymond Wiker.
Patch by Robert E. Brown. Add type declarations to keep SBCL quiet.
it might work better if this file were actually committed
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.
|Powered by ViewVC 1.1.5|