emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A simple implementation of context-sensitive keys


From: Lennart Borgman
Subject: Re: A simple implementation of context-sensitive keys
Date: Fri, 12 Sep 2008 13:00:38 +0200

On 9/12/08, Tassilo Horn <address@hidden> wrote:
> "Lennart Borgman (gmail)" <address@hidden> writes:
>
> Hi Lennart,
>
> >> I think you could reimplement the key lookup procedure you referenced
> >> and don't stop searching when KEY is found.  Then you know the name
> >> of the map.
> >
> > What do you mean? Please write the code and show it.
>
> Sorry, no time to write the code now.  What I mean is that in
>
>  (info "(elisp)Searching Keymaps")
>
> there's the pseudocode how emacs finds the command for a key.  Now you
> can surrogate "FIND-IN" with lookup-key and see if the key is bound in
> the map.  In that code you know the map or at least the mode, cause you
> either have the variable directly (like overriding-local-map) or you
> walk an alist of the form ((mode-name . keymap)...) in the case of
> FIND-IN-ANY.

It would be good if that where true, but it is not. You have to take a
closer look to understand how this works. I think a good start might
be the code I sent before.

> Bye,
> Tassilo
>




reply via email to

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