GNU bug report logs - #6882
24.0.50; <PREFIX KEY> C-h does not show remap bindings

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Wed, 18 Aug 2010 18:07:01 UTC

Severity: normal

Merged with 8350, 8351

Found in version 24.0.50

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Drew Adams" <drew.adams <at> oracle.com>
To: 6882 <at> debbugs.gnu.org
Subject: bug#6882: 24.0.50; <PREFIX KEY> C-h does not show remap bindings
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'
 





This bug report was last modified 14 years and 47 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.