[Top][All Lists]
[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: |
Wed, 26 Apr 2006 13:56:43 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
address@hidden (Kim F. Storm) writes:
> David Kastrup <address@hidden> writes:
>
>>> Am I wrong here?
>
> I think I answered that... (answer: yes)
>
>>
>> On another tangent, is this change ok? For implementing follow-link,
>> I need to take a look at the follow-link binding in the keymap of a
>> click, not the binding of the click itself.
>
> Looks ok to me.
>> Incidentally, this function looks faulty: it should search the keymap
>> _and_ the local-map property (in _that_ order) instead of searching at
>> most one of the two, even if that search would fail.
>
> I think the rationale is that one assumes that a user would only add
> either a keymap or a local-map property
But there are lots of maps between those two in the search order, so
there might be good reason to use both even in a single application.
> -- but in any case, it should look for the keymap property before
> the local-map property.
>
> But it seems easy to fix it to DTRT.
I will do a fix which looks in both keymaps. Maybe there should be
something like posn-key-binding which looks through _all_ relevant
keymaps at the point of a click (which would include the various
buffer-local and global maps)?
How does this actually work in the normal event loop?
>> Apart from fixing it and adding an optional key argument, is help.el
>> the right place for it?
>
> For what?
For the function `string-key-binding'. If I add an optional KEY
argument, this function becomes a "general-purpose" function used
outside of help.el (which is the point of the exercise), and putting
it there is probably counterintuitive. It should probably be with
`posn-string' and similar, which are currently in subr.el.
It also appears that string-key-binding is not in the Elisp manual.
It might be worth grouping with the `posn-string' and similar
descriptions, too.
However, I'll fix it in help.el for now, check in that change, and
whether to move it can still be decided afterwards.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
- Getting the click position in a string, David Kastrup, 2006/04/25
- Re: Getting the click position in a string, Kim F. Storm, 2006/04/25
- Re: Getting the click position in a string, David Kastrup, 2006/04/26
- Re: Getting the click position in a string, Kim F. Storm, 2006/04/26
- Re: Getting the click position in a string,
David Kastrup <=
- Re: Getting the click position in a string, David Kastrup, 2006/04/26
- Re: Getting the click position in a string, David Kastrup, 2006/04/26
- Re: Getting the click position in a string, Stefan Monnier, 2006/04/26
- Re: Getting the click position in a string, David Kastrup, 2006/04/27
- Re: Getting the click position in a string, Stefan Monnier, 2006/04/27
- Re: Getting the click position in a string, David Kastrup, 2006/04/27
- Re: Getting the click position in a string, Stefan Monnier, 2006/04/27
- Re: Getting the click position in a string, David Kastrup, 2006/04/27
- Re: Getting the click position in a string, Stefan Monnier, 2006/04/28
- Re: Getting the click position in a string, David Kastrup, 2006/04/29