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

From: "Drew Adams" <[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'