Harald Hanche-Olsen <hanche@math.ntnu.no> wrote:
+---------------
| Indeed, and if you consider the ASDF world, the loading of your
| package may not be the direct result of the user loading it, but
| rather the indirect result of some other package requiring it. And
| then an altered readtable might mess things up for a third package
| that is being loaded after yours.
+---------------
As "R. Mattes" pointed out in another branch, what you're calling
"package" is really "module" or even just "file", yes? Not a CL
PACKAGE per se, right?
Anyway, one of the things one can do is make use of the fact that
both LOAD & COMPILE-FILE bind *READTABLE*... and thus restore it!
So putting this at the top of a file will confine the effects to
that file alone:
(eval-when (:compile-toplevel :load_toplevel :execute)
(setf *readtable* (copy-readtable))
(setf (readtable-case *readtable* :whatever))
(set-syntax-from-char ...whatever...)
(set-dispatch-macro-character ...whatever...)
...etc...)
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607