Macro character dispatch functions should be the same for upper and lowercase letters

This commit is contained in:
jjgarcia 2005-04-19 16:25:12 +00:00
parent af2d9050bf
commit e210078ce4
2 changed files with 9 additions and 2 deletions

View file

@ -123,6 +123,10 @@ ECL 0.9f
- When *PRINT-READABLY*=T, vectors just print as arrays.
- When used as macro characters, upper and lowercase letters share the same
dispatcher, so that if the user defines a dispatcher for #f, it is
automagically set for #F and viceversa.
* MOP Compatibility:
- We have implemented the *-SLOT-DEFINITION classes, as well as the protocol

View file

@ -1745,9 +1745,12 @@ ecl_invalid_character_p(int c)
if (entry->macro != cl_core.dispatch_reader || entry->dispatch_table == NULL)
FEerror("~S is not a dispatch character.", 1, dspchr);
subcode = char_code(subchr);
if (islower(subcode))
subcode = toupper(subcode);
entry->dispatch_table[subcode] = fnc;
if (islower(subcode)) {
entry->dispatch_table[toupper(subcode)] = fnc;
} else if (isupper(subcode)) {
entry->dispatch_table[tolower(subcode)] = fnc;
}
@(return Ct)
@)