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: Stefan Monnier
Subject: Re: Getting the click position in a string
Date: Thu, 27 Apr 2006 12:05:08 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> 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.

I think it only makes sense to write it in the C code if the resulting code
can be shared with Fread_key_sequence.  Until such a reorg is done, it'd be
good to provide the function in subr.el along the other posn-* functions.

But in order not to make it appear like an "accessor function", maybe it'd
be better to name it differently, e.g. "posn-lookup-key-binding".
Of course, another way to do it is to change `key-binding' so that it
accepts a `posn' argument (and/or an event argument).


        Stefan




reply via email to

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