emacs-devel
[Top][All Lists]
Advanced

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

Re: Getting the click position in a string


From: David Kastrup
Subject: Re: Getting the click position in a string
Date: Thu, 27 Apr 2006 14:08:08 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> But I increasingly feel that this is not the right way to go, the
>> whole function should get dissed out, and instead we should have
>> something like
>
>> (posn-key-binding event &optional accept-default remap key)
>
> Sounds right.

I have taken a look how the command loop does this right now.  It
appears that read-key-sequence does all the lookup (and it is more or
less necessary to do so in order to decide when a key sequence is
finished), stuffs the looked-up command as a by-product into an
internal variable that appears not accessible at the Lisp level (at a
first glance), and the command loop picks it out from there.

Of all the ugly...

Factoring the keymap and partial keymaps out into a separate function
would probably not be trivial.  But even if code reuse might not be
practical, I think that something like posn-key-binding should be
implemented in keyboard.c so that there is some guarantee it will
deliver the same results.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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