[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 11:48:48 +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:
>> Well, it does not seem just as easy as that.  I now can't start
>> RefTeX anymore without getting the error:
>> Debugger entered--Lisp error: (wrong-type-argument sequencep mouse-2)
>>   key-binding([(shift mouse-2)])
> Should be fixed now.

Hm, looks like it works now.  I have removed string-key-binding from
help.el (it is no longer necessary) and the results appear fine to me.

Since we want to get good testing for the key-binding stuff, I'll
check this change to help.el in.  I am still not convinced that the
overriding keymap thingies are properly dealt with, but I'll have to
come up with a test case involving them before complaining.

key-binding in its new incantation should also be used in mouse.el to
get the bindings for `follow-link' and similar.  I had posted an API
proposal for `key-binding' previously, but it suffered from not
realizing the difference between events, and keysequences made from
events (`key-binding' can't be used to look up events, and I am less
than certain that it should).

So we probably should either

a) add an additional optional parameter BASE-KEY which, when non-NIL,
will replace KEY for all purposes of lookup except determining the
keymaps to use when KEY is a key-sequence based on an event.

b) have a function `event-replace-key' or something with a better name
which will take a key sequence based on an event and swap out the
basic event (but maybe _not_ its modifiers since they can play a part
in which keymap to use) and swap out the `down-mouse-2' or similar
with `follow-link'.

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

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