[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Case sensitivity (was: CLtL, cleanups)
I found a better function than SI:RDTBL-TRANS. There's a *documented*
function SET-CHARACTER-TRANSLATION. The calling sequence is
set-character-translation from-char &optional (to-char nil) (readtable *readtable*)
If to-char is NIL then the character isn't translated. So, to get
case-sensitive reading, do
(loop for code from (char-code #\a) to (char-code #\z)
do (set-character-translation (code-char code)))
This function also does some sanity checking that SETF of SI:RDTBL-TRANS
bypasses; for instance, it won't let you set the translation of a
readmacro character (except to set it to translate to itself).
barmar