diff --git a/src/CHANGELOG b/src/CHANGELOG index f2febb1c3..d7b504bc6 100644 --- a/src/CHANGELOG +++ b/src/CHANGELOG @@ -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 diff --git a/src/c/read.d b/src/c/read.d index 2ec0ff537..201e60f45 100644 --- a/src/c/read.d +++ b/src/c/read.d @@ -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) @)