From: Tony M. <to...@te...> - 2004-01-01 21:44:11
Attachments:
reader.lisp.diff
|
Some reader functions, such as SET-MACRO-DISPATCH-CHARACTER, make the readtable default to *STANDARD-READTABLE* when the explicit readtable argument is NIL. The compiler detects the type error, but the REPL doesn't (as the attached test shows), so *STANDARD-READTABLE* is updated, making WITH-STANDARD-IO-SYNTAX behave in a non-standard manner. (Um, I think!) Here's the test case: (defun read-percent (stream char) (declare (ignore char)) `'(,(read stream t nil t))) (set-macro-character #\% #'read-percent t nil) (assert (not (eql '%foo (read-from-string "%foo")))) (with-standard-io-syntax (assert (eql '%foo (read-from-string "%foo")))) The attached patch removes *STANDARD-READTABLE* as a default in these cases. Comments welcome--perhaps DECLARE would be more SBCL-ish than CHECK-TYPE? --Tony |