XEmacs 21.2 "Demeter" [Lucid] (sparc-sun-solaris2.5) of Mon Mar 15
1999 on ahoward
I can't quite tell if these two things are bugs or not. In any case,
the behaviors are undesirable, at least to me. Any other opinions?
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? `(insert abc)'
looks particularly bad to me: it's indistinguishable from the case
where I do this, instead:
(defconst abc "def")
(define-key global-map "|"
'(lambda ()
"Insert the value of the string variable abc"
(interactive)
(insert abc)))
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
(defvar my-map nil)
(define-prefix-command 'my-map)
(define-key my-map "a" 'self-insert-command)
I check to see how "A" is bound:
(lookup-key my-map "A")
nil
Then I test it: I bind backquote to my-map and see what happens.
(global-set-key "`" 'my-map)
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
(define-key my-map "A" 'undefined)
and
(suppress-keymap my-map)
Each of these does what I want with GNU Emacs, but not with XEmacs.
Is this a bug, or am I just missing something?
--
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