GNU bug report logs - #6576
documentation `string-to-char' is incorrect

Previous Next

Package: emacs;

Reported by: MON KEY <monkey <at> sandpframing.com>

Date: Tue, 6 Jul 2010 21:35:01 UTC

Severity: minor

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: MON KEY <monkey <at> sandpframing.com>
To: 6576 <at> debbugs.gnu.org
Subject: bug#6576: documentation `string-to-char' is incorrect
Date: Tue, 6 Jul 2010 17:34:41 -0400
First sentence of doc string for `string-to-char' is incorrect.

,---- (documentation 'string-to-char )
| "Convert arg STRING to a character, the first character of that
| string.  A multibyte character is handled correctly.
|
| (fn STRING)"
`----

Should be something more like:

  "Return decimal integer value of first character in STRING."

The rationale for the proposed docstring change are:

- The second clause of sentence doesn't parse;

- The arg string (nor its 1st char) are _not_ converted, e.g.:

  (let ((not-cnvrtd "bubba"))
    (string-to-char not-cnvrtd)
    not-cnvrtd) ;; <- value of not-cnvrtd is a string not a char.

- It is more in keeping with what the manual says:

  ,---- (info "(elisp)Basic Char Syntax")
  | Since characters are really integers, the printed representation
  | of a character is a decimal number.
  `----

Affliced docstring appears in GNU Emacs 23.2.1 and current through
Bzr-100633

--
/s_P\




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

Previous Next


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