Hrvoje Niksic <hniksic(a)srce.hr> writes:
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.
You might even say that binding keys to anonymous functions is
ridiculous, but if someone does it in some lisp code, and some else
tries to get help on the key, they should get helpful help. If using
`prin1' will make the help message better, why not change it?
> 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.
(Certainly, once I find out about that variable, I'll have some idea
what it is. I tend to rely on the info files for documentation, so if
the variable isn't mentioned in those, I'm not likely to find it. My
second option is to browse through Emacs lisp files. I haven't done
anything approaching a thorough search, but I haven't found the
variable in any of those, either. I guess I'll have to start reading
the c source code, like you said...8-|)
Whether the resulting behaviour in your case is correct is another
question. I think it is.
I'm not sure what you mean by "correct". As far as I can tell, the
behavior I see agrees with the documentation, so it is "correct".
(Only as far as I can tell, though: does some info file actually say
what happens in a keymap if shifted keys are undefined?)
On the other hand, I think it would be better if one could actually
define keymaps in which "a" does something and "A" does not. (For
example, one might want to do this in dired mode. For another
example, when typing TeX documents, one might want a keymap for typing
Greek letters and other symbols, so hitting `g will insert "\gamma",
`G will insert "\Gamma", `a will insert "\alpha", and `A will beep,
because there is no "\Alpha" in TeX. I'd much rather have it beep
than insert "\alpha".)
The behavior now may be correct, but that doesn't mean it can't be
improved. (I can think of several options: for example, defining a
key to be 'undefined could override the value of
retry-undefined-key-binding-unshifted, or the value of this variable
could be "local" to each keymap. As it stands, I still can't tell how
to use this variable in any way that's helpful rather than annoying
(considering things like SHFT-SPC, etc.).)
--
John H. Palmieri
e-mail: palmieri.2(a)nd.edu 205 Computing/Math Bldg.
URL:http://www.nd.edu/~jpalmier/ University of Notre Dame
(219) 631-8846 Notre Dame, IN 46556