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: Sun, 30 Apr 2006 23:55:23 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> key-binding already looks up events or keys, so I suppose you are
>> confused about what I was proposing.
>
> It accepts events?  That's news to me.
>
>> The purpose is to look up a key such as [follow-link] in the chain of
>> keymaps corresponding to a click event.
>
> Yes, that's whayt I understood.
>
>> So the event takes the place of the keymap, not of the key.
>
> What keymap?
>
>    key-binding is a built-in function in `C source code'.
>    (key-binding key &optional accept-default no-remap)
>
> I see no keymap argument.

Probably because I am confusing this with lookup-key.  Looks like I
messed up my proposal royally due to this mixup, and I don't
understand your counterproposal and corresponding arguments either,
most likely because you tried making sense of my nonsense in a way
that I am not able to follow.

So my proposal would _rather_ have been to have lookup-key accept an
event in the place of KEYMAP, where an event means the chain of
keymaps associated with the events.  This does not seem like a
sensible interface since it makes lookup-key either act on a
single-keymap level, or perform a more complex lookup.

So the function to tweak would seem to be rather key-binding after
all.  Instead of making it accept an event as one of the existing
arguments, however, one should probably add another optional argument
which will then augment the "current keymaps" that the function is
supposed to be searching, according to the event.

It would not really suffice to let it accept an event instead of KEY:
for implementing the follow-link functionality, the lookup has to be
for [follow-link], but for a given event of type down-mouse-1 or
similar.

So an additional event specifier seems to be both required and
appropriate.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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