[Top][All Lists]
[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: |
Wed, 10 Sep 2008 21:21:40 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
Hi Stefan,
> Another way to get a similar result is:
>
> (define-key <map> <key> '(menu-item "dummy" <binding>
> :filter (lambda (binding)
> (when <condition> binding))))
Wow, yet another alternative besides the keymap text property Miles
mentioned.
> In any case, the main problem with such things (whichever way they're
> implemented) is that the rest of Emacs doesn't know and/or expect such
> condition bindings, so C-h k gives only partial information, and
> similarly where-is doesn't know how to tell the whole story.
Sure, so I'd say that in general modes shouldn't use such facilities by
default. Which commands should be executed depending on which context
is a quite subjective decision anyway. But to have the possibilities
right at hand is great, whichever one you use.
Bye,
Tassilo
--
[Emacs] is written in Lisp, which is the only computer language that is
beautiful. -- Neal Stephenson, _In the Beginning was the Command Line_
- Re: A simple implementation of context-sensitive keys, (continued)
Re: A simple implementation of context-sensitive keys, Stefan Monnier, 2008/09/10
- Re: A simple implementation of context-sensitive keys,
Tassilo Horn <=
Re: A simple implementation of context-sensitive keys, Lennart Borgman (gmail), 2008/09/11
Re: A simple implementation of context-sensitive keys, Lennart Borgman (gmail), 2008/09/11
Re: A simple implementation of context-sensitive keys, Tassilo Horn, 2008/09/11
Re: A simple implementation of context-sensitive keys, Lennart Borgman (gmail), 2008/09/11
Re: A simple implementation of context-sensitive keys, Tassilo Horn, 2008/09/12
Re: A simple implementation of context-sensitive keys, Lennart Borgman (gmail), 2008/09/12