unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#6576: documentation `string-to-char' is incorrect
@ 2010-07-06 21:34 MON KEY
  2010-07-07  7:12 ` Eli Zaretskii
  0 siblings, 1 reply; 20+ messages in thread
From: MON KEY @ 2010-07-06 21:34 UTC (permalink / raw)
  To: 6576

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\





^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2011-07-21 18:38 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-06 21:34 bug#6576: documentation `string-to-char' is incorrect MON KEY
2010-07-07  7:12 ` Eli Zaretskii
2010-07-07  8:40   ` Andreas Schwab
2010-07-07 10:31     ` Eli Zaretskii
2010-07-07 12:16       ` Andreas Schwab
2010-07-07 14:23         ` Eli Zaretskii
2010-07-07 15:46           ` Eli Zaretskii
2011-07-13 23:50             ` Lars Magne Ingebrigtsen
2011-07-14  2:13               ` Chong Yidong
2011-07-14 13:02                 ` Lars Magne Ingebrigtsen
2011-07-14  3:06               ` Eli Zaretskii
2011-07-14 13:00                 ` Lars Magne Ingebrigtsen
2011-07-14 13:34                   ` Eli Zaretskii
2011-07-14 14:06                     ` Lars Magne Ingebrigtsen
2011-07-14 15:59                       ` Eli Zaretskii
2011-07-14 16:12                         ` Lars Magne Ingebrigtsen
2011-07-14 19:37                           ` Eli Zaretskii
2011-07-14 19:39                             ` Lars Magne Ingebrigtsen
2011-07-15 19:06                               ` MON KEY
2011-07-21 18:38                                 ` Chong Yidong

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).