* bug#6882: 24.0.50; <PREFIX KEY> C-h does not show remap bindings
@ 2010-08-18 18:06 Drew Adams
0 siblings, 0 replies; only message in thread
From: Drew Adams @ 2010-08-18 18:06 UTC (permalink / raw
To: 6882
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'
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-08-18 18:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-18 18:06 bug#6882: 24.0.50; <PREFIX KEY> C-h does not show remap bindings Drew Adams
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.