Subject: 24.0.50; <PREFIX KEY> C-h does not show remap bindings

From: "Drew Adams" <[email-masked]>
Date: Wed, 18 Aug 2010 11:06:20 -0700

emacs -Q
 
(define-key ctl-x-map "p" bookmark-map)
(defvar foo-mode-map (make-sparse-keymap) "")
(define-minor-mode foo-mode "..." nil " FOO")
(define-key bookmark-map "3" 'forward-char)
(define-key bookmark-map "4" 'previous-line)
(define-key foo-mode-map [remap forward-char] 'forward-line)
(define-key foo-mode-map "\C-xp4" 'next-line)
 
M-x foo-mode
 
C-h k C-x p 3  ; forward-line (correct)
C-h k C-x p 4  ; next-line    (correct)
 
C-x p C-h      ; incomplete - `C-x p 3' is not listed
 
The `C-x p 4' binding in `foo-mode-map' is listed by `C-x p C-h', but
there is no binding listed in `foo-mode-map' for the remapped command
`forward-char'.  You should either see a `C-x p 3' or (more precisely) a
<remap forward-char> binding listed in `foo-mode-map'.  Better would be
to see both.
 
You will perhaps argue that command `forward-line' is not actually bound
to `3' on the prefix key `C-x p'.  But from a user perspective it can be
argued that it is.  When you do `C-h k C-x p 3', for example, the output
says:
 
  "C-x p 3 runs the command forward-line...
   It is bound to C-f, C-x p 3."
 
That second line is a lie - the command is not actually bound to `C-x p
3'.  But it is a useful lie.  To be correct, we would say "It is bound
to C-f, <remap forward-char>."  But giving the resulting key is helpful.
 
For both `C-h k' and <PREFIX KEY> C-h, the most helpful might be to show
both <remap forward-char> and `C-x p 3'.

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2010-08-16 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'