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: Tassilo Horn
Subject: Re: A simple implementation of context-sensitive keys
Date: Fri, 12 Sep 2008 11:47:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

"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.

Bye,
Tassilo




reply via email to

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