Replies/questions for both Hrvoje Niksic and Jan Vroonhof here...
**********
Hrvoje Niksic <hniksic(a)srce.hr> writes:
John H Palmieri <John.H.Palmieri.2(a)nd.edu> writes:
> I can't quite tell if these two things are bugs or not.
Not.
[snip]
Output of `describe-key' is not intended to be read back to the
reader
I'm not sure what you mean by this. Since `C-h k' is one of the basic
help commands available, its output should be as clear and unambiguous
as possible.
, so the difference between `princ' and `prin1' should
not
matter.
**********
I said:
2. The second problem is that I can't seem to define a key map
in
which "a" is bound but "A" is not. I initialize the keymap with
[...]
Now hitting `a inserts a. Hitting `A inserts a. Hitting `b gives
the message
` b is not defined.
How can I get `A to act like `b? I've tried
Hrvoje Niksic <hniksic(a)srce.hr> replied:
That's a feature which you can turn off by setting
`retry-undefined-key-binding-unshifted' to nil. However, I find
globally setting this to nil annoying, as it makes pressing
shift-space beep because "Sh-SPC is not defined".
I'm not sure if it can be turned on or off as a per-keymap property.
I don't know how FSFmacs behaves wrt retrying keys unshifted.
If I just give GNU Emacs the command
(define-key my-map "a" 'self-insert-command)
then GNU Emacs and XEmacs act the same: hitting `A inserts "a". With
GNU Emacs, both
(define-key my-map "A" 'undefined)
and
(suppress-keymap my-map)
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.)
**********
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)? How should I have found out about it, besides
asking people familiar with the source code?
I'm a little confused by the documentation:
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'? Or
does it mean something else? Does anyone know of examples of this
being used in defining keymaps?
--
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