From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#6576: documentation `string-to-char' is incorrect Date: Wed, 07 Jul 2010 13:31:27 +0300 Message-ID: <834ogb8txc.fsf@gnu.org> References: <83630r934x.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1278500439 27108 80.91.229.12 (7 Jul 2010 11:00:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 7 Jul 2010 11:00:39 +0000 (UTC) Cc: monkey@sandpframing.com, 6576@debbugs.gnu.org To: Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 07 13:00:37 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OWSMm-00070T-Lf for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Jul 2010 13:00:36 +0200 Original-Received: from localhost ([127.0.0.1]:53239 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWSMm-0000kd-Bg for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Jul 2010 07:00:36 -0400 Original-Received: from [140.186.70.92] (port=43767 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWSM5-0000RW-OP for bug-gnu-emacs@gnu.org; Wed, 07 Jul 2010 06:59:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OWSM4-0002oA-1m for bug-gnu-emacs@gnu.org; Wed, 07 Jul 2010 06:59:53 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33491) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWSM3-0002o3-VR for bug-gnu-emacs@gnu.org; Wed, 07 Jul 2010 06:59:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OWRy1-0003L8-Od; Wed, 07 Jul 2010 06:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Jul 2010 10:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6576 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6576-submit@debbugs.gnu.org id=B6576.127849887612827 (code B ref 6576); Wed, 07 Jul 2010 10:35:01 +0000 Original-Received: (at 6576) by debbugs.gnu.org; 7 Jul 2010 10:34:36 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWRxc-0003Kq-EQ for submit@debbugs.gnu.org; Wed, 07 Jul 2010 06:34:36 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWRxZ-0003Kk-Bo for 6576@debbugs.gnu.org; Wed, 07 Jul 2010 06:34:34 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0L5600F00NUEJP00@a-mtaout20.012.net.il> for 6576@debbugs.gnu.org; Wed, 07 Jul 2010 13:33:29 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.127.120.144]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L5600F6YNZR0Q20@a-mtaout20.012.net.il>; Wed, 07 Jul 2010 13:33:28 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 07 Jul 2010 06:35:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:38283 Archived-At: > From: Andreas Schwab > Cc: MON KEY , 6576@debbugs.gnu.org > Date: Wed, 07 Jul 2010 10:40:00 +0200 > > Eli Zaretskii writes: > > > "Return the Unicode codepoint of the first character of STRING. > > This is not correct. The value is just the internal encoding of the > character. Which is Unicode, AFAIK. The note takes care of the extension that is specific to Emacs. If there are other extensions that I forgot, we can add more notes. > It's identical to (aref STRING 0) I don't think talking about `(aref STRING 0)' in a doc string is a good idea. Only people who know quite a lot about the internal representation and what aref does in this case will understand such a documentation. > except that it returns 0 for the empty string This fact should probably be mentioned in the doc string. > > Note: eight-bit characters are returned as single-byte values in the > > range 160 to 255, inclusive." > > That depends on the multibyteness of the string. Eight-bit characters are defined as such only in multibyte strings. But I think the note is correct for unibyte strings as well, because they by definition include raw bytes.