[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6576: documentation `string-to-char' is incorrect
From: |
MON KEY |
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\
- bug#6576: documentation `string-to-char' is incorrect,
MON KEY <=