From: Glenn Morris Date: Tue, 13 Aug 2013 07:15:27 +0000 (-0700) Subject: * lispref/lists.texi (List Elements): Undocument nth, nthcdr with n < 0 X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1686^2~293 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3e6b67c9b7230bf10219082d9215d9617a33715e;p=emacs.git * lispref/lists.texi (List Elements): Undocument nth, nthcdr with n < 0 --- diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 29ab28c0fad..6df8c3912a3 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,8 @@ +2013-08-13 Glenn Morris + + * lists.texi (List Elements): + Undocument behavior of nth and nthcdr with n < 0. (Bug#15059) + 2013-08-13 Xue Fuqiao * frames.texi (Display Feature Testing): Add indexes. diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi index 14601de1814..9daf01cd0a2 100644 --- a/doc/lispref/lists.texi +++ b/doc/lispref/lists.texi @@ -270,8 +270,10 @@ are numbered starting with zero, so the @sc{car} of @var{list} is element number zero. If the length of @var{list} is @var{n} or less, the value is @code{nil}. -If @var{n} is negative, @code{nth} returns the first element of -@var{list}. +@c Behavior for -ve n undefined since 2013/08; see bug#15059. +@ignore +If @var{n} is negative, @code{nth} returns the first element of @var{list}. +@end ignore @example @group @@ -281,10 +283,6 @@ If @var{n} is negative, @code{nth} returns the first element of @group (nth 10 '(1 2 3 4)) @result{} nil -@end group -@group -(nth -3 '(1 2 3 4)) - @result{} 1 (nth n x) @equiv{} (car (nthcdr n x)) @end group @@ -300,7 +298,8 @@ This function returns the @var{n}th @sc{cdr} of @var{list}. In other words, it skips past the first @var{n} links of @var{list} and returns what follows. -If @var{n} is zero or negative, @code{nthcdr} returns all of +@c "or negative" removed 2013/08; see bug#15059. +If @var{n} is zero, @code{nthcdr} returns all of @var{list}. If the length of @var{list} is @var{n} or less, @code{nthcdr} returns @code{nil}. @@ -314,7 +313,7 @@ If @var{n} is zero or negative, @code{nthcdr} returns all of @result{} nil @end group @group -(nthcdr -3 '(1 2 3 4)) +(nthcdr 0 '(1 2 3 4)) @result{} (1 2 3 4) @end group @end example