[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: local keymap patch for key-binding
From: |
David Kastrup |
Subject: |
Re: local keymap patch for key-binding |
Date: |
Mon, 11 Sep 2006 15:04:36 +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:
>
>> Ok, here I triggered a problem: I used C-h k (with the new help.el)
>> followed by a mouse-2 click on an overlay's 'before-string which has
>> its own 'keymap and 'display properties (the string, not the overlay).
>>
>> I get
>>
>> Debugger entered--Lisp error: (args-out-of-range 806 806)
>> key-binding([(mouse-2 (#<window 41 on ang.tex> 806 ... -61397984 ... 806
>> ... ... ... ...))] t)
>> describe-key([(mouse-2 (#<window 41 on ang.tex> 806 ... -61397984 ... 806
>> ... ... ... ...))] 1 nil)
>> call-interactively(describe-key)
>>
>> It would appear that 806 is the buffer position, and I would guess
>> that this is erroneously used as in index into the before-string
>> property of the overlay.
>
> I need a self-contained test-case to work on that.
> And I need to know the full contents of the failing event.
I found the problem already. However, contrary to Chong Yidong's
assertion, a proper lookup dealing with keymap property, local-map
property (which Chong does not check at all), correct use of
overriding-local-map and overriding-terminal-local-map (which have to
be consulted before the keymaps of the mouse event, but based on the
buffer that the event happened in) is not as trivial as the current
code would suggest.
Also, the C-h k test masks some problems because it manually switches
to the buffer where the event occured before looking it up, so we
don't see the case where the event is not from the current
window/buffer/terminal.
I am currently trying to implement this correctly, based on
(info "(elisp) Active Keymaps")
and the code for read-key-sequence.
I'll hopefully be through with this in a few hours.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
- Re: local keymap patch for key-binding, (continued)
- Re: local keymap patch for key-binding, Chong Yidong, 2006/09/09
- Re: local keymap patch for key-binding, Chong Yidong, 2006/09/10
- Re: local keymap patch for key-binding, David Kastrup, 2006/09/10
- Re: local keymap patch for key-binding, Chong Yidong, 2006/09/10
- Re: local keymap patch for key-binding, David Kastrup, 2006/09/11
- Re: local keymap patch for key-binding, David Kastrup, 2006/09/11
- Re: local keymap patch for key-binding, Kim F. Storm, 2006/09/11
- Re: local keymap patch for key-binding, David Kastrup, 2006/09/11
- Re: local keymap patch for key-binding, David Kastrup, 2006/09/11
- Re: local keymap patch for key-binding, Kim F. Storm, 2006/09/11
- Re: local keymap patch for key-binding,
David Kastrup <=
- Re: local keymap patch for key-binding, Chong Yidong, 2006/09/11
- Re: local keymap patch for key-binding, Richard Stallman, 2006/09/11
- Re: local keymap patch for key-binding, David Kastrup, 2006/09/12
- Re: local keymap patch for key-binding, David Kastrup, 2006/09/12
- PCL-CVS's diff and marks (was: local keymap patch for key-binding), Stefan Monnier, 2006/09/12
- Re: PCL-CVS's diff and marks, David Kastrup, 2006/09/12
- Re: PCL-CVS's diff and marks, Stefan Monnier, 2006/09/12
- Re: local keymap patch for key-binding, Richard Stallman, 2006/09/12
- Re: local keymap patch for key-binding, David Kastrup, 2006/09/12
- Re: local keymap patch for key-binding, David Kastrup, 2006/09/12