CMUCL commit: src/code (extfmts.lisp)
Raymond Toy
rtoy at common-lisp.net
Fri Mar 12 11:39:38 CET 2010
Date: Friday, March 12, 2010 @ 05:39:38
Author: rtoy
Path: /project/cmucl/cvsroot/src/code
Modified: extfmts.lisp
Wrap the call to compile-from-stream in WITH-STANDARD-IO-SYNTAX to
ensure that we can compile the external format correctly no matter
what the user might have done to readtable and other variables. This
supersedes the previous change that just bound *readtable* to the
standard read table.
--------------+
extfmts.lisp | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
Index: src/code/extfmts.lisp
diff -u src/code/extfmts.lisp:1.21 src/code/extfmts.lisp:1.22
--- src/code/extfmts.lisp:1.21 Mon Mar 8 15:43:20 2010
+++ src/code/extfmts.lisp Fri Mar 12 05:39:37 2010
@@ -5,7 +5,7 @@
;;; domain.
;;;
(ext:file-comment
- "$Header: /project/cmucl/cvsroot/src/code/extfmts.lisp,v 1.21 2010-03-08 20:43:20 rtoy Exp $")
+ "$Header: /project/cmucl/cvsroot/src/code/extfmts.lisp,v 1.22 2010-03-12 10:39:37 rtoy Exp $")
;;;
;;; **********************************************************************
;;;
@@ -360,16 +360,15 @@
(or (gethash name *external-formats*)
(and (consp name) (find-external-format name))
- (and (let ((*package* (find-package "STREAM"))
- (lisp::*enable-package-locked-errors* nil)
- ;; The standard readtable is what we want to use when
- ;; compiling the external format, in case the user
- ;; has changed *readtable* in some way.
- (*readtable* (copy-readtable nil))
- (s (open (format nil "ext-formats:~(~A~).lisp" name)
- :if-does-not-exist nil :external-format :iso8859-1)))
- (when s
- (null (nth-value 1 (ext:compile-from-stream s)))))
+ (and (with-standard-io-syntax
+ ;; Use standard IO syntax so that changes by the user
+ ;; don't mess up compiling the external format.
+ (let ((*package* (find-package "STREAM"))
+ (lisp::*enable-package-locked-errors* nil)
+ (s (open (format nil "ext-formats:~(~A~).lisp" name)
+ :if-does-not-exist nil :external-format :iso8859-1)))
+ (when s
+ (null (nth-value 1 (ext:compile-from-stream s))))))
(gethash name *external-formats*))))
(defun %composed-ef-name (a b)
More information about the cmucl-commit
mailing list