Lisp HUG Maillist Archive

case-sensitive lispworks

Is there a way to get Lispworks to give me "fooBar" as a result of (symbol-name :fooBar)? 

I specifically don't want to use :|fooBar| if I can help it.

Franz has case-sensitive mlisp in addition to their alisp. It doesn't seem that LW has something similar but I thought I'd check.

	Thanks, Joel

---
http://twitter.com/wagerlabs


Re: case-sensitive lispworks

On Sun, May 16, 2010 at 5:24 PM, Joel Reymont <joelr1@gmail.com> wrote:
>
> Is there a way to get Lispworks to give me "fooBar" as a result of (symbol-name :fooBar)?
>
> I specifically don't want to use :|fooBar| if I can help it.
>
> Franz has case-sensitive mlisp in addition to their alisp. It doesn't seem that LW has something similar but I thought I'd check.

You may be satisfied changing the readtable-case.  E.g., with :PRESERVE :

CL-USER 1 > (setf (readtable-case *readtable*) :preserve)
:PRESERVE

CL-USER 2 > (SYMBOL-NAME :fooBar)
"fooBar"

but notice that we needed to write SYMBOL-NAME.  You might get a
little more milage from :INVERT :

CL-USER 3 > (SETF (READTABLE-CASE *READTABLE*) :INVERT)
:invert

CL-USER 4 > (symbol-name :fooBar)
"fooBar"

CL-USER 5 > (symbol-name :foobar)
"FOOBAR"

CL-USER 6 > (symbol-name :FOOBAR)
"foobar"

Take a look at readtable-case, and related documentation:

http://www.lispworks.com/documentation/HyperSpec/Body/f_rdtabl.htm
http://www.lispworks.com/documentation/HyperSpec/Body/23_aba.htm
http://www.lispworks.com/documentation/HyperSpec/Body/22_accba.htm

//JT

-- 
Joshua Taylor, http://www.cs.rpi.edu/~tayloj/


Updated at: 2020-12-10 08:39 UTC