home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / lisp / 3086 < prev    next >
Encoding:
Text File  |  1992-12-15  |  1.5 KB  |  43 lines

  1. Newsgroups: comp.lang.lisp
  2. Path: sparky!uunet!spool.mu.edu!yale.edu!ira.uka.de!news.belwue.de!eratu.rz.uni-konstanz.de!hoehle
  3. From: hoehle@inf-wiss.ivp.uni-konstanz.de (Joerg-Cyril Hoehle)
  4. Subject: eval-when situation question
  5. Message-ID: <1992Dec15.190606.102345@eratu.rz.uni-konstanz.de>
  6. Summary: finding out a minimal set of situations for eval-when
  7. Keywords: eval-when, *readtable*
  8. Sender: usenet@eratu.rz.uni-konstanz.de
  9. Organization: Information Science, Univ. of Konstanz
  10. X-Newsreader: TIN [version 1.1 PL6]
  11. Date: Tue, 15 Dec 1992 19:06:06 GMT
  12. Lines: 29
  13.  
  14. Hi,
  15.  
  16. I've got a file that makes use of a modified *readtable* provided by
  17. an other file, and I'd like the environment (say *readtable*) not
  18. altered by the loading (or even compilation) of that file.
  19.  
  20. This read-table modifies (using set-macro-character) the entry for ?.
  21. The example file looks like this:
  22.  
  23. (eval-when (compile)
  24.     (setq *readtable* *special-readtable*))
  25.  
  26. (defvar foobar '((?a) ?b))
  27.  
  28. Ideally, the reader would expand the ? at read-time, so that the
  29. compiler wouldn't even see the ?. I believe that the (eval-when
  30. (compile) #) takes care of this.
  31.  
  32. If there's no compiler or if loading the .lisp file, I expect the
  33. *readtable* to be set during the loading process, whatever that means,
  34. and foobar to get the correct, expanded, value.
  35.  
  36. But I'm wondering why CLtLII, p.89 provides a similar example with
  37. set-macro-character and says to use (eval-when (compile load eval) #),
  38. not only (compile) as the set of situations.
  39.  
  40. Thanks for shedding light on this issue,
  41.      Joerg.
  42. hoehle@inf-wiss.ivp.uni-konstanz.d
  43.