# HG changeset patch # User Chong Yidong # Date 1232378011 0 # Node ID d0a16c6d0444dfa6ba8b2acd63344caf70daa298 # Parent 80f2fb7eeef51a7d1da3f6dc49cf07838a02439a (Fsubstring): Doc fix. diff -r 80f2fb7eeef5 -r d0a16c6d0444 src/fns.c --- a/src/fns.c Mon Jan 19 15:05:32 2009 +0000 +++ b/src/fns.c Mon Jan 19 15:13:31 2009 +0000 @@ -1183,11 +1183,16 @@ } DEFUN ("substring", Fsubstring, Ssubstring, 2, 3, 0, - doc: /* Return a substring of STRING, starting at index FROM and ending before TO. -TO may be nil or omitted; then the substring runs to the end of STRING. -FROM and TO start at 0. If either is negative, it counts from the end. - -This function allows vectors as well as strings. */) + doc: /* Return a new string whose contents are a substring of STRING. +The returned string consists of the characters between index FROM +\(inclusive) and index TO (exclusive) of STRING. FROM and TO are +zero-indexed: 0 means the first character of STRING. Negative values +are counted from the end of STRING. If TO is nil, the substring runs +to the end of STRING. + +The STRING argument may also be a vector. In that case, the return +value is a new vector that contains the elements between index FROM +\(inclusive) and index TO (exclusive) of that vector argument. */) (string, from, to) Lisp_Object string; register Lisp_Object from, to;