emacs-devel
[Top][All Lists]
Advanced

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

Re: Get a command by its keybinding and also respecting key translation


From: Tassilo Horn
Subject: Re: Get a command by its keybinding and also respecting key translation
Date: Wed, 15 Dec 2010 22:20:18 +0100
User-agent: KMail/1.13.5 (Linux/2.6.37-rc5+; KDE/4.5.4; x86_64; ; )

On Wednesday 15 December 2010 16:30:47 Davis Herring wrote:

Hi Davis,

> >                            (let ((default-command (key-binding ,key t)))
> 
> Wasn't it key-binding's insufficiency that provoked the original
> question?

Good catch!  But the situation has still improved in this use case.
Formerly, if no context key predicate triggered and no default command
could be found (due to TAB vs. <tab> or other translations), you ended
up with a possibly important command missing, like indenting according
to mode.  The only use case for default-command I can see is triggering
a context key only when the user types a key repeatedly.  And if then
the original command after translation and the guessed default-command
don't match or the latter is nil, you could still look it up manually
and encode it in your predicate.

Bye,
Tassilo



reply via email to

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