emacs-devel
[Top][All Lists]
Advanced

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

Re: read-char doesn't use input-decode-map


From: Stefan Monnier
Subject: Re: read-char doesn't use input-decode-map
Date: Wed, 30 Dec 2009 21:51:04 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux)

> Wow, read-key is pretty wild. I didn't realize you could do that
> with idle timers.  Perhaps that's vanilla if you're used to
> emacs' event handling :)

It's definitely not vanilla: it took me a while to find something that
worked OK, and even the current solution is pretty hackish since it
relies on time to detect "key press boundaries", which is fundamentally
unreliable.  Sadly, I think there is fundamentally no reliable way to
solve this problem, so it's probably about as good as it gets.

> This apparently means that code like I attached has no way to
> reliably translate all of a certain key into another key, at
> least for existing code that uses read-char.  For example,
> y-or-n-p.

Using read-char makes it pretty much hopeless, yes.
Most uses of reac-char should be replaced by read-key instead.


        Stefan





reply via email to

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