Subject: Re: Problem enabling bracket mode it CLSQL
From: rpw3@rpw3.org (Rob Warnock)
Date: Sun, 22 Jan 2006 19:38:01 -0600
Newsgroups: comp.lang.lisp
Message-ID: <o6-dnaRDSuLkrknenZ2dnUVZ_vydnZ2d@speakeasy.net>
Jonathon McKitrick <j_mckitrick@bigfoot.com> wrote:
+---------------
| Rob Warnock wrote:
| > And if file-compiling it, the OP'll probably need an EVAL-WHEN wrapped
| > around them, too...
| 
| When, in general, do you *not* want EVAL-WHEN wrapped around a reader
| macro call?
+---------------

Whenever you want the reader macro to apply only to a stream which
is *not* the current source text file, e.g.:

    (let ((save (get-dispatch-macro-character #\# #\$)))
      (unwind-protect
          (progn (set-dispatch-macro-character #\# #\$ #'my-dollar-reader)
                 (read SOME-STREAM))
        (set-dispatch-macro-character #\# #\$ save)))

    ==> #<a form read from SOME-STREAM with #$ syntax active>


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607