[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#7006: Reader oddity after ?\^ --- should signal error if invalid ins
bug#7006: Reader oddity after ?\^ --- should signal error if invalid instead of being garbage
Sat, 16 Jul 2011 22:16:59 -0400
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
>> ?\^ is supposed to be the prefix for a control character --- for
>> example, ?\^g. However, the character following the ^ can be a
>> non-existent control character like ' ' or ')'. Currently, the reader
>> outputs a nonsense value in this case. Instead, the reader ought to
>> signal an error.
It's not "nonsense".
> => 67108921
> That seems awfully confusing.
> (format "%x" 67108921)
> => "4000039"
> Does anybody know whether this a feature or a bug?
It's a feature. The ?<something> syntax can be used for more than
chars: it can be used for any char and any combination of modifiers
(such as the control modifier above), where the modifiers are stored in
the upper bits of the number.
An exception is made for those few chars whose combination which control
exists in ASCII, where the ?\C-<char> is then represented by the
corresponding ASCII char rather than use the "control" modifier bit.