[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 key translation
From: |
Tassilo Horn |
Subject: |
Re: Get a command by its keybinding and also respecting key translation |
Date: |
Tue, 14 Dec 2010 23:51:21 +0100 |
User-agent: |
KMail/1.13.5 (Linux/2.6.37-rc5+; KDE/4.5.4; x86_64; ; ) |
On Tuesday 14 December 2010 20:50:43 Stefan Monnier wrote:
> > (define-context-key outline-minor-mode-map
> > (kbd "<tab>")
> > th-outline-context-p
> > org-cycle)
>
> You can do it this way:
>
> (define-key outline-minor-mode-map
> (kdb "<tab>")
> `(menu-item "dummy" org-cycle
> :filter ,(lambda (cmd)
> (if (th-outline-context-p) cmd))))
Hm, just for educational purposes, could you please explain the
backquoting and the comma-substitution of the lambda? I mean, I know
that `,' in a backquote triggers evaluation, but since a lambda evals to
itself, what's the point in doing so?
Thanks!
Tassilo
- Get a command by its keybinding and also respecting key translation, Tassilo Horn, 2010/12/13
- Re: Get a command by its keybinding and also respecting key translation, Stefan Monnier, 2010/12/14
- Re: Get a command by its keybinding and also respecting key translation,
Tassilo Horn <=
- Re: Get a command by its keybinding and also respecting key translation, Stefan Monnier, 2010/12/18
- 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