Subject: bug#1943 closed by Chong Yidong <[email-masked]> (Re: 23.0.60; doc string for substring: mention value is a copy, string is any vector)

From: [email-masked] (Emacs bug Tracking System)
Date: Mon, 19 Jan 2009 15:20:03 +0000

This is an automatic notification regarding your bug report
which was filed against the emacs package:

#1943: 23.0.60; doc string for substring: mention value is a copy, string is any vector

It has been closed by Chong Yidong <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Chong Yidong <[email-masked]> by
replying to this email.

-- 
1943: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1943
Emacs Bug Tracking System
Contact [email-masked] with problems

Subject: Re: 23.0.60; doc string for substring: mention value is a copy, string is any vector
From: Chong Yidong <[email-masked]>
To: "Drew Adams" <[email-masked]>
Cc: [email-masked]
Date: Mon, 19 Jan 2009 10:14:34 -0500

> The doc string for function `substring' could be made clearer.

I've rewritten it.  Thanks for the report.

Subject: 23.0.60; doc string for substring: mention value is a copy, string is any vector
From: "Drew Adams" <[email-masked]>
To: <[email-masked]>
Date: Sat, 17 Jan 2009 15:35:11 -0800

The doc string for function `substring' could be made clearer.

1. Like the Elisp manual entry for `substring', mention that the
value returned does not share with the input STRING object. That is, a
copy of the substring is returned, not the substring itself.
 
2. State more clearly that STRING can be any kind of vector, not just
a vector of characters.

3. FROM and TO do not "start" at 0.  It is indexing that starts at 0.
   Better to speak of "zero-based indexing".
 
Something like this:
 
  "Return a new string whose characters are a substring of STRING.
STRING can be any kind of vector; elements need not be characters.
Indexing of STRING is zero-based.  The substring starts at index
FROM and ends before index TO.  If TO is nil, then the substring
runs to the end of STRING.  If either FROM or TO is negative,
then STRING is indexed backward, from its end."

In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2009-01-04 on
 LENNART-69DE564 Windowing system distributor `Microsoft Corp.',
 version 5.1.2600 configured using `configure --with-gcc (3.4)
 --no-opt --cflags -Ic:/g/include -fno-crossjumping'