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: Stefan Monnier
Subject: Re: Get a command by its keybinding and also respecting key translation
Date: Tue, 14 Dec 2010 14:50:43 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> (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))))


-- Stefan



reply via email to

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