emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (that binding is currently shadowed ...)


From: Stefan Monnier
Subject: Re: (that binding is currently shadowed ...)
Date: Tue, 23 Jan 2007 10:57:44 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux)

>> If cua-mode is enabled and you define a minor mode using C-c as a
>> prefix key you describe-bindings wrongly says that C-c is
>> shadowed. This is quite disturbing since C-c by some of the
>> punctuation characters is what a minor mode is supposed to use (my
>> example uses C-c RET which is a bit bad). Here is how the output can
>> look:
>> 
>> key             binding
>> ---             -------
>> 
>> C-c          Prefix Command
>> (that binding is currently shadowed by another mode)
>> 

> Here is a patch which fixes this problem.  I'm not sure whether it
> has any bad effects in other cases.  Stefan?

I'm not very familiar with this code, actually.
But it doesn't look quite right.  I believe the test

   !(KEYMAPP (definition) && KEYMAPP (tem))

should be done outside the other `if', so that it also prevents using
`continue' if mention_shadow is 0.  OTOH in the case of EQ (tem, definition)
we still want to continue unconditionally.

Also, I'm not quite sure how this code handles the recursion in sub-keymaps,
so maybe I'm talking nonesense.


        Stefan


PS: The "*/" on a separate line is not the style used in Emacs's C code
    usually, so I'd rather not introduce it here.




reply via email to

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