Subject: Re: bug#9293: say what they are shadowed by

From: Lennart Borgman <[email-masked]>
Date: Mon, 22 Aug 2011 23:44:23 +0200

On Mon, Aug 22, 2011 at 23:29, Stefan Monnier <[email-masked]> wrote:
> severity 9293 wishlist
> thanks
>
>>    Tar mode defined in `tar-mode.el':...
>>    0 .. 9             digit-argument  (binding currently shadowed)
>
>> Shadowed by what?
>
>>    e .. f             tar-extract  (binding currently shadowed)
>
>>    C-d                tar-flag-deleted
>>    RET                tar-extract
>>      (that binding is currently shadowed by another mode)
>>    C-n                tar-next-line
>>    C-p                tar-previous-line
>>    SPC                tar-next-line
>>      (that binding is currently shadowed by another mode)
>
>> Say what mode on each of such lines!
>
> That would be nice, indeed.

I agree.

I took a look at this quite some time ago now and wrote the command
describe-key-and-map-briefly (which is in ourcomment-utils.el in
nXhtml). This uses some adhod guessing to find the keymap that the
used key is defined in. Perhaps this can be expanded to take care of
the case above too (I am not quite sure at the moment). The command
itself is also useful and might replace describe-key-briefly.

However when writing this command I noticed that there is not enough
information available so some guessing must be done (or the
information must be enhanced somehow, of course).