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: Sat, 16 Sep 2006 01:47:58 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

David Kastrup <address@hidden> writes:

> Richard Stallman <address@hidden> writes:
>
>> Ok, I agree to adding the LOCATION arg.  But it needs to be documented.
>
> Here is the latest patch iteration.  I think it should be fit for
> checking in.  It might also seem reasonable to add the optional
> `position' argument to `current-active-maps', but this has not been
> done.

Here is a patch that would achieve that.  After scanning through
keymap.c, I believe that this should be the last change required to
provide APIs to the keymap access on overlays and display strings,
thus making manual simulation of keymap search order for whatever
purpose unnecessary.  At a cursory glance through callers, I don't see
code within Emacs itself which would really require this at the
current point of time.  I remember some stuff by now implemented with
unread-command-events that went through hoops in order to repeat a key
lookup with one keymap excluded.

This kind of thing would be more reliably achieved by using
`current-active-maps' with a position argument, removing the
non-needed keymap from the list, and repeating the lookup.

While I don't think we should change any of the existing callers right
now, it might be a good idea to have this API available in future.
The implementation is reasonably simple.  I don't think a GCPRO is
needed here, but I can't say that I know garbage collection inside
out.

If there is agreement to put this in in order to complete the accessor
functions to mouse-dependent keymaps, I would add this to the manual
and NEWS file, too.

What do you think?

Attachment: txtDsMgvwUdZ9.txt
Description: Text Data


-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

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