From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>,
Stefan Monnier <monnier@iro.umontreal.ca>,
emacs-devel@gnu.org
Subject: Re: A simple implementation of context-sensitive keys
Date: Thu, 11 Sep 2008 22:38:30 +0200 [thread overview]
Message-ID: <48C981C6.9030201@gmail.com> (raw)
In-Reply-To: <87hc8miwy0.fsf@thinkpad.tsdh.de>
Tassilo Horn wrote:
> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
>
> Hi!
>
>>> Currently the problem of which minor mode gets the key press is
>>> resolved just by the corresponding minor mode's position in
>>> minor-mode-map-alist. The first one gets it.
>> Eh, and maybe I should have added that it is easier to understand what
>> I am talking about after looking here:
>>
>> (info "(elisp) Searching Keymaps")
>
> So I guess a first step into the right direction would be to enhance
> `describe-key' that it doesn't stop if KEY is found, but to list the
> shadowed commands, too. Something like
If you say that this is the first step so, yes ... ;-)
> ,----
> | TAB (translated from <tab>) runs the command message-tab, which is an
> | interactive compiled Lisp function in
> | `/usr/share/emacs/23.0.60/lisp/gnus/message.el'.
> |
> | It is bound to TAB in `message-mode-map'. <== This is new
There is currently no function in Emacs to find the keymap variable
name. However I wrote the command `describe-key-and-map-briefly' that
tries to find the keymap variable name. This is a bit tricky and I am
sure that you can construct cases where it does not work. However so far
I have not found any example where it does not work.
Here is the output from it
<f1> c is bound to `describe-key-and-map-briefly' in `global-map'
and here is the output from `describe-key-briefly' (the default binding
for <f1> c):
<f1> c runs the command describe-key-and-map-briefly
The function is in this file
http://bazaar.launchpad.net/~nxhtml/nxhtml/main/annotate/52?file_id=ourcommentsutil.el-20080724174035-zgon4j679232cch3-182
> | (message-tab)
> |
> | Complete names according to `message-completion-alist'.
> | Execute function specified by `message-tab-body-function' when not in
> | those headers.
> |
> | It shadows the following commands: <== This is new
> |
> | `foo' (bound to TAB in `foo-mode-map')
> | `bar' (bound to TAB in `bar-mode-map')
> | ...
> `----
Yes, something like that.
> Bye,
> Tassilo
next prev parent reply other threads:[~2008-09-11 20:38 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-10 7:17 A simple implementation of context-sensitive keys Tassilo Horn
2008-09-10 10:36 ` Lennart Borgman (gmail)
2008-09-10 10:57 ` Tassilo Horn
2008-09-10 16:43 ` Ted Zlatanov
2008-09-10 14:14 ` Sean O'Rourke
2008-09-10 14:48 ` Miles Bader
2008-09-10 14:53 ` Juanma Barranquero
2008-09-10 15:17 ` Sean O'Rourke
2008-09-10 15:32 ` Juanma Barranquero
2008-09-11 7:35 ` Tassilo Horn
2008-09-11 8:17 ` Miles Bader
2008-09-11 8:48 ` Tassilo Horn
2008-09-10 17:49 ` Stefan Monnier
2008-09-10 19:21 ` Tassilo Horn
2008-09-11 1:41 ` Stefan Monnier
2008-09-11 7:17 ` Tassilo Horn
2008-09-11 14:40 ` Ted Zlatanov
2008-09-11 15:53 ` Tassilo Horn
2008-09-11 13:41 ` Lennart Borgman (gmail)
2008-09-11 13:48 ` Lennart Borgman (gmail)
2008-09-11 14:22 ` Tassilo Horn
2008-09-11 20:38 ` Lennart Borgman (gmail) [this message]
2008-09-12 6:58 ` Tassilo Horn
2008-09-12 8:34 ` Lennart Borgman (gmail)
2008-09-12 9:47 ` Tassilo Horn
2008-09-12 11:00 ` Lennart Borgman
2008-09-12 16:13 ` Tassilo Horn
2008-09-12 23:46 ` Lennart Borgman (gmail)
2008-09-13 7:28 ` Tassilo Horn
2008-09-13 9:32 ` Lennart Borgman (gmail)
2008-09-15 7:26 ` Tassilo Horn
2008-09-15 22:39 ` Lennart Borgman (gmail)
2008-09-11 20:44 ` Stefan Monnier
2008-09-11 21:14 ` Lennart Borgman (gmail)
2008-09-12 1:33 ` Stefan Monnier
2008-09-12 8:29 ` Lennart Borgman (gmail)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48C981C6.9030201@gmail.com \
--to=lennart.borgman@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.