John H Palmieri <John.H.Palmieri.2(a)nd.edu> writes:
> Output of `describe-key' is not intended to be read back to
the
> reader
I'm not sure what you mean by this.
I mean that the output of `C-h k' is not guaranteed to be correct so
you can type `C-x C-e' on the printed form to evaluated. It's just
supposed to tell you the name of the function.
Since `C-h k' is one of the basic help commands available, its
output should be as clear and unambiguous as possible.
I guess `princ' could be changed to `prin1' without too many problems,
but binding keys to anonymous functions and then complaining about
`C-h k' output is ridiculous.
make `A undefined. This seems like better behavior to me: the
default is still to have "A" act like "a" (so SHFT-SPC acts like
SPC), but it's not hard to unbind "A" if one wants to. (Plus, one
might actually be led to try this by reading the documentation.)
The name of the variable `retry-undefined-key-binding-unshifted'
suggests that undefined keys should be retried unshifted. Obviously,
the code in keymap.c considers a key being bound to `undefined' as
"undefined", which looks correct to me.
Whether the resulting behaviour in your case is correct is another
question. I think it is.
Jan Vroonhof <vroonhof(a)math.ethz.ch> writes:
> This seems to be intentional. There is 28 lines of C to just this. See also
> `retry-undefined-key-binding-unshifted' (watch the Doc string though).
> I am not sure why this is done though...
Is this variable documented anywhere (in an info file, that is: I
know how to type C-h v)?
No; probably by omission. It will be documented sooner or later.
How should I have found out about it, besides asking people familiar
with the source code?
By looking at the source code yourself? :-)
Documentation:
If a key-sequence which ends with a shifted keystroke is undefined
and this variable is non-nil then the command lookup is retried again
with the last key unshifted. (e.g. C-X C-F would be retried as C-X C-f.)
If lookup still fails, a normal error is signalled. In general,
you should *bind* this, not set it.
Does "bind" in the last sentence mean that I should use `let'?
Yes. I have no idea what how the author envisioned this binding,
though.