home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.lisp
- Path: sparky!uunet!spool.mu.edu!yale.edu!ira.uka.de!news.belwue.de!eratu.rz.uni-konstanz.de!hoehle
- From: hoehle@inf-wiss.ivp.uni-konstanz.de (Joerg-Cyril Hoehle)
- Subject: eval-when situation question
- Message-ID: <1992Dec15.190606.102345@eratu.rz.uni-konstanz.de>
- Summary: finding out a minimal set of situations for eval-when
- Keywords: eval-when, *readtable*
- Sender: usenet@eratu.rz.uni-konstanz.de
- Organization: Information Science, Univ. of Konstanz
- X-Newsreader: TIN [version 1.1 PL6]
- Date: Tue, 15 Dec 1992 19:06:06 GMT
- Lines: 29
-
- Hi,
-
- I've got a file that makes use of a modified *readtable* provided by
- an other file, and I'd like the environment (say *readtable*) not
- altered by the loading (or even compilation) of that file.
-
- This read-table modifies (using set-macro-character) the entry for ?.
- The example file looks like this:
-
- (eval-when (compile)
- (setq *readtable* *special-readtable*))
-
- (defvar foobar '((?a) ?b))
-
- Ideally, the reader would expand the ? at read-time, so that the
- compiler wouldn't even see the ?. I believe that the (eval-when
- (compile) #) takes care of this.
-
- If there's no compiler or if loading the .lisp file, I expect the
- *readtable* to be set during the loading process, whatever that means,
- and foobar to get the correct, expanded, value.
-
- But I'm wondering why CLtLII, p.89 provides a similar example with
- set-macro-character and says to use (eval-when (compile load eval) #),
- not only (compile) as the set of situations.
-
- Thanks for shedding light on this issue,
- Joerg.
- hoehle@inf-wiss.ivp.uni-konstanz.d
-