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.
1. If I execute
(define-key global-map "|"
'(lambda ()
"Insert the string \"abc\""
(interactive)
(insert "abc")))
then hitting the `|' key inserts the string "abc". The output from
`M-x describe-key |' looks a bit funny, though:
| runs (lambda nil Insert the string "abc" (interactive) (insert abc))
Insert the string "abc"
What happened to the quotation marks " in the first line, both
around the documentation string and the abc at the end?
That's probably because `describe-key' and friends use `princ' to
print the symbol. `princ' does not print delimiters around strings.
If you want delimiters, you should use `prin1'.
Output of `describe-key' is not intended to be read back to the
reader, so the difference between `princ' and `prin1' should not
matter.
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
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.
Each of these does what I want with GNU Emacs, but not with XEmacs.
I don't know how FSFmacs behaves wrt retrying keys unshifted.