Subject: Re: bug#15059: 24.3; nth with negative index values

From: Andreas Schwab <[email-masked]>
Date: Fri, 09 Aug 2013 17:51:50 +0200

Wilfred Hughes <[email-masked]> writes:

> I've noticed that nth returns the first item in a list, when it's given
> a negative index.
>
> (nth -1 '(5 6 7)) ;; 5
> (nth -2 '(5 6 7)) ;; 5
>
> Judging by my reading of the docstring, I was expecting nil

The list is longer than -1, so this case doesn't apply.

Andreas.

-- 
Andreas Schwab, [email-masked]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."