compiler: bind lexically *readtable* when file is compiled

Both byte and C compilers didn't bind lexically *readtable*, what lead
to pollution of other compiled packages. Fixes #95 and #59.

Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
This commit is contained in:
Daniel Kochmański 2015-07-28 14:25:29 +02:00
parent d8609840d3
commit d75552027a
3 changed files with 5 additions and 1 deletions

View file

@ -96,7 +96,9 @@
(with-open-file (sout output-file :direction :output :if-exists :supersede
:if-does-not-exist :create
:external-format external-format)
(let ((binary (loop with *package* = *package*
(let ((binary (loop
with *package* = *package*
with *readtable* = *readtable*
with ext:*bytecodes-compiler* = t
for position = (file-position input)
for form = (read input nil :EOF)

View file

@ -553,6 +553,7 @@ output = si_safe_eval(2, ecl_read_from_cstring(lisp_code), ECL_NIL);
(*error-output* *error-output*)
(*compiler-in-use* *compiler-in-use*)
(*package* *package*)
(*readtable* *readtable*)
(*print-pretty* nil)
(*compile-file-pathname* nil)
(*compile-file-truename* nil)

View file

@ -456,6 +456,7 @@ static cl_object VV[VM];
(*error-output* *error-output*)
(*compiler-in-use* *compiler-in-use*)
(*package* *package*)
(*readtable* *readtable*)
(*print-pretty* nil)
(*compile-file-pathname* nil)
(*compile-file-truename* nil)