[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Get a command by its keybinding and also respecting keytranslation
From: |
Drew Adams |
Subject: |
RE: Get a command by its keybinding and also respecting keytranslation |
Date: |
Wed, 15 Dec 2010 14:03:38 -0800 |
I think I see what you want, but I'm not getting part of the why (use case).
Can you describe a bit what the advantage is in doing this at a key-binding
level rather than at a command level?
IOW, I imagine that this must save you some trouble but I'm not sure what that
savings is. What is the advantage over defining a dispatching command and
binding that to the key? E.g.,
(defun my-dispatch-cmd ()
"..."
(interactive)
(cond (blah (foo))
(toto (call-interactively #'fee))
(titi (call-interactively #'bar))
(tata (booph))
(t (call-interactively default-command))))
Stefan's suggestion was at the key-binding level, like yours, but I think its
effect is pretty much the same as binding a command that tests the conditions
(?).
You contrasted your proposal with Stefan's suggestion, saying that yours allowed
for multiple bindings of the same key, applying whichever binding was
appropriate in context (using a priority order and conditions IIUC).
But I don't get that point. What is the advantage of having multiple bindings
for the same key (in the same map) and picking which is used according to a
condition? Why not just bind the key to a command that tests those same
conditions? What am I missing?
- Re: Get a command by its keybinding and also respecting key translation, (continued)
- Re: Get a command by its keybinding and also respecting key translation, Tassilo Horn, 2010/12/20
- Re: Get a command by its keybinding and also respecting key translation, Andreas Schwab, 2010/12/20
- Re: Get a command by its keybinding and also respecting key translation, Tassilo Horn, 2010/12/20
- Re: Get a command by its keybinding and also respecting key translation, David Kastrup, 2010/12/20
- Re: Get a command by its keybinding and also respecting key translation, Tassilo Horn, 2010/12/20
- Re: Get a command by its keybinding and also respecting key translation, Andreas Schwab, 2010/12/20
Re: Get a command by its keybinding and also respecting key translation, Tassilo Horn, 2010/12/15
RE: Get a command by its keybinding and also respecting keytranslation,
Drew Adams <=
Re: Get a command by its keybinding and also respecting keytranslation, Tassilo Horn, 2010/12/15
RE: Get a command by its keybinding and also respecting keytranslation, Drew Adams, 2010/12/15
Re: Get a command by its keybinding and also respecting keytranslation, Stefan Monnier, 2010/12/18
Re: Get a command by its keybinding and also respecting key translation, Stefan Monnier, 2010/12/18