GNU bug report logs - #9700
24.0.50; doc string of `key-description'

Previous Next

Package: emacs;

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

Date: Sat, 8 Oct 2011 06:47:01 UTC

Severity: minor

Found in version 24.0.50

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 24.0.50; doc string of `key-description'
Date: Fri, 7 Oct 2011 23:46:14 -0700
The doc string dates from before Emacs 21.  It was correct then but has
been incorrect ever since the nutty decision in Emacs 21 to add angle
brackets around function keys.
 
emacs -Q
 
(setq toto  (read-key-sequence "k: "))
 
Hold the Control key and hit the Insert key.
 
(key-description toto) => "<C-insert>"
 
From the doc string:
 
 "Control characters turn into "C-foo" sequences, meta into "M-foo",
  spaces are put between sequence elements, etc."
 
Since Emacs 21 that needs to be changed to "<C-foo>" and "<M-foo>",
since "foo" is obviously the name of a function key (more than one
character in the name).
 
And of course it would be better not to use "foo" at all, but to use an
example like that in the Elisp manual: (elisp) `Describing Characters'
is accurate.
 

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-09-19 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.5) --no-opt'
 





This bug report was last modified 13 years and 133 days ago.

Previous Next


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