From d75552027a99b9701a49084d626b53fad809bb2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Tue, 28 Jul 2015 14:25:29 +0200 Subject: [PATCH] compiler: bind lexically *readtable* when file is compiled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- contrib/bytecmp/bytecmp.lsp | 4 +++- src/cmp/cmpmain.lsp | 1 + src/new-cmp/cmpmain.lsp | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/bytecmp/bytecmp.lsp b/contrib/bytecmp/bytecmp.lsp index e4299ec1f..cd8313ddc 100755 --- a/contrib/bytecmp/bytecmp.lsp +++ b/contrib/bytecmp/bytecmp.lsp @@ -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) diff --git a/src/cmp/cmpmain.lsp b/src/cmp/cmpmain.lsp index 3df99c759..50edbe8f7 100755 --- a/src/cmp/cmpmain.lsp +++ b/src/cmp/cmpmain.lsp @@ -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) diff --git a/src/new-cmp/cmpmain.lsp b/src/new-cmp/cmpmain.lsp index 9513dcebe..97b1280c7 100644 --- a/src/new-cmp/cmpmain.lsp +++ b/src/new-cmp/cmpmain.lsp @@ -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)