emacs-devel
[Top][All Lists]
Advanced

[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: Wed, 13 Sep 2006 17:25:10 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Richard Stallman <address@hidden> writes:

> It looks like your patch does three things:
>
> 1. Makes Fkey_binding handle all the maps properly.
> 2. Implements a new arg LOCATION.
> 3. Changes something else in keyboard.c for motives that were
> never explained.
>
> Is there some reason why we need to add the LOCATION arg feature
> now?

Things like the follow-link property don't work consistently.  The
keymaps where follow-link entries have an effect are not the same than
the keymaps where the mouse events are stored.

This inconsistency is annoying and unpredictable to application
programmers.

> I think we should not add it now if we don't really need to.

One actually needs something like the location argument (I reworked
this into a POSITION argument in the next patch, with position being
something like `event-start' returns) in order to have
`command-remapping' work on the same maps when it is called by
`key-binding'.

> I already asked for an explanation of the purpose of the other
> change in keyboard.c.

Probably a miscommunication, or crossing mails.  I think I explained
it a few times already.  But again: if we have both a `keymap' and
`local-map' text property in the buffer, the resulting behavior is
inconsistent with the documentation of keymap lookup: one of those
properties then gets ignored.  The cost of making it consistent with
the documentation is negligible both in amounts of code (maybe 4
lines) as well as performance (probably sub-microsecond).  So I
consider it a bugfix worth doing, even though I don't know of anybody
who has yet been bitten by this bug.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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