unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#4751: 23.1; `read-char' inserts accented chars when you use `M-' modifier
@ 2009-10-18 21:44 Drew Adams
  2009-10-18 22:36 ` Andreas Schwab
  2009-10-19  2:15 ` Stefan Monnier
  0 siblings, 2 replies; 13+ messages in thread
From: Drew Adams @ 2009-10-18 21:44 UTC (permalink / raw)
  To: bug-gnu-emacs

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)'
 







^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-09-11  4:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2009-10-20 15:05                 ` Drew Adams
2009-10-20 19:56                   ` Stefan Monnier
2011-09-11  4:47                     ` Lars Magne Ingebrigtsen

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).