bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#4751: 23.1; `read-char' inserts accented chars when you use `M-' mod


From: Stefan Monnier
Subject: bug#4751: 23.1; `read-char' inserts accented chars when you use `M-' modifier
Date: Tue, 20 Oct 2009 09:51:28 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

>> >> I guess you're saying that there is no bug here (for `read-char').
>> > Not at all.  Actually it turns out that read-key also returns
>> > 244 for M-t so the problem is elsewhere.  Hmm...
>> Actually, for read-key, I just fixed it.
>> For read-char, it's done on purpose, so it's easy to change, but it's
>> likely to break some code somewhere.
> FWIW, this is a new bug.  Prior to Emacs 23, read-char for the input `M-t'
> returned ?\M-t. It returns, for M-t:

> Emacs 20, 21: -134217612 = ?\M-t
> Emacs 22: 134217844 (#o1000000164, #x8000074) = ?\M-t
> Emacs 23: 244 (#o364, #xf4)

Yes, but it's a change that was done on purpose (at least
the code is quite explicit), so undoing it is a bit risky.
Hmm... OK, I just reverted that part of the change, we'll see
what happens.

The fundamental problem is that read-char is ill-defined: on the one
hand, it wants to return "raw undecoded events" and on the other it
wants to return chars (which in the general case need decoding, e.g. to
turn an escape sequence into <kp-3> and then into the char ?3) and uses
a far-reaching definition of "char" (basically: any event represented by
an integer).


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]