From: alex_sv on
Hi all,

I know that clisp behaves in a case sensitive way when being started
with -modern option passed via the command line. On the other side
sbcl does not support -modern option at all - or any other command
line switches related to case sensitiveness.
I believe that there are ways to make reader/writer be case sensitive
- at least in runtime, for sbcl.
Could you please point me to the way that is a portable one?

Thanks in advance,
Alex
From: Tamas K Papp on
On Mon, 12 Oct 2009 08:00:51 -0700, alex_sv wrote:

> Hi all,
>
> I know that clisp behaves in a case sensitive way when being started
> with -modern option passed via the command line. On the other side sbcl
> does not support -modern option at all - or any other command line
> switches related to case sensitiveness. I believe that there are ways to
> make reader/writer be case sensitive - at least in runtime, for sbcl.
> Could you please point me to the way that is a portable one?

(SETF (READTABLE-CASE *READTABLE*) :PRESERVE)

HTH,

Tamas
From: DanL on
On 12 Okt., 17:10, Tamas K Papp <tkp...(a)gmail.com> wrote:

> (SETF (READTABLE-CASE *READTABLE*) :PRESERVE)

Which would force one to use UPPERCASE for everything in package CL of
corse.

(setf (readtable-case *readtable*) :invert)

would be another option.

Regards,

dhl
From: Tobias C. Rittweiler on
Tamas K Papp <tkpapp(a)gmail.com> writes:

> On Mon, 12 Oct 2009 08:00:51 -0700, alex_sv wrote:
>
> > Hi all,
> >
> > I know that clisp behaves in a case sensitive way when being started
> > with -modern option passed via the command line. On the other side sbcl
> > does not support -modern option at all - or any other command line
> > switches related to case sensitiveness. I believe that there are ways to
> > make reader/writer be case sensitive - at least in runtime, for sbcl.
> > Could you please point me to the way that is a portable one?
>
> (SETF (READTABLE-CASE *READTABLE*) :PRESERVE)

Using the recently released Named-Readtables library, you can also do

(let ((*readtable* (find-readtable :modern)))
...)

or base your custom readtables on top of :MODERN via

(defreadtable :foo
(:merge :modern)
(:macro-char ...)
...)

or equivalent to that

(defreadtable :foo
(:merge :standard)
(:readtable-case :preserve)
(:macro-char ...)
...)


-T.
From: alex_sv on
On 12 ÏËÔ, 19:35, "Tobias C. Rittweiler" <t...(a)freebits.de.invalid>
wrote:
>...

Thanks all, (setf (readtable-case *readtable*) :invert) works like a
charm :)

BR,
Alex