all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 4751@emacsbugs.donarmstrong.com
Subject: bug#4751: 23.1; `read-char' inserts accented chars when you use `M-' modifier
Date: Tue, 20 Oct 2009 09:51:28 -0400	[thread overview]
Message-ID: <jwvoco2434k.fsf-monnier+emacsbugreports@gnu.org> (raw)
In-Reply-To: <CE9BE2C3D6EE4C2D82950694495C1EB8@us.oracle.com> (Drew Adams's message of "Mon, 19 Oct 2009 19:30:33 -0700")

>> >> 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	other threads:[~2009-10-20 13:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-18 21:44 bug#4751: 23.1; `read-char' inserts accented chars when you use `M-' modifier Drew Adams
2009-10-18 22:36 ` Andreas Schwab
2009-10-19  2:15 ` Stefan Monnier
2009-10-19  6:11   ` Drew Adams
2009-10-19 13:54     ` Stefan Monnier
2009-10-19 21:42       ` Drew Adams
2009-10-20  1:20         ` Stefan Monnier
2009-10-20  2:13           ` Stefan Monnier
2009-10-20  2:30             ` Drew Adams
2009-10-20 13:51               ` Stefan Monnier [this message]
2009-10-20 15:05                 ` Drew Adams
2009-10-20 19:56                   ` Stefan Monnier
2011-09-11  4:47                     ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvoco2434k.fsf-monnier+emacsbugreports@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=4751@emacsbugs.donarmstrong.com \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.