On Thu, November 30, 2006 4:56 pm, Nathan Froyd wrote:
> SBCL currently does not differentiate between uppercase and lowercase
> sub-chars in dispatched reader macros, so something like:
> (make-dispatch-macro-character #\@)
> (set-dispatch-macro-character #\@ #\b #'(lambda (s c n) (print c)))
> will always print #\B. This seems like a bug.
> ANSI 2.4.8 says that the reader macros #A and #a are considered to be
> equivalent; it does not say that such case-folding is done in all cases. I
> can't find any other place in the spec that would suggest SBCL's current
> behavior. And, FWIW, at least once previous hacker in CMUCL/SBCL history
> thought the same way I did, as src/code/sharpm.lisp defines both #A and
set-dispatch-macro-character causes new-function to be called when
disp-char followed by sub-char is read. If sub-char is a lowercase letter,
it is converted to its uppercase equivalent. It is an error if sub-char is
one of the ten decimal digits.
(from 23.2 of the hyperspec).
It doesn't say anything about GET-DISPATCH-MACRO-CHARACTER, but it seems
to me pretty obvious that it should say the same thing.