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: Drew Adams
Subject: bug#4751: 23.1; `read-char' inserts accented chars when you use `M-' modifier
Date: Sun, 18 Oct 2009 14:44:45 -0700

This is probably a feature, not a bug. But I don't really see it
explained, and it confuses me, at least.
 
emacs -Q
M-: (read-char "aaa: ")
Hit `M-a'.
 
That returns an `a' char with acute accent - 225 (#o341, #xe1).
Similarly, for other `Meta' key sequences. `read-char-exclusive' does
the same thing.
 
The doc string does say:
"If the character has modifiers, they are resolved and reflected to the
character code if possible (e.g. C-SPC -> 0)."
 
That's a bit cryptic ("reflected to the char code"?), but I guess it
means this has something to do with character encodings?  How do I
control that in Elisp - how, for instance, do I make `read-char' treat
`M-a' as a non-character event? (I assume that most people don't use
`M-a' if they want to insert an `a' with acute accent.)
 
Maybe the doc (e.g. manual) could explain this.
 
Also, for the arg descriptions the Elisp manual refers to the
`read-event' doc (same node) for an explanation. But that doc says:
 
 If INHERIT-INPUT-METHOD is non-`nil', then the current input
 method (if any) is employed to make it possible to enter a
 non-ASCII character.  Otherwise, input method handling is disabled
 for reading this event.
 
I don't think that accented chars are ASCII chars. So is this doc
incorrect? It makes it sound as if you cannot enter a non-ASCII
character, but `M-a' seems to do just that (and it does so whether the
INHERIT-INPUT-METHOD arg is nil or t).
 
Anyway, call me confused. HTH, to clarify the doc for me and others
who might be similarly confused.
 

In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600)
 of 2009-07-29 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4)'
 







reply via email to

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