GNU bug report logs - #15059
24.3; nth with negative index values

Previous Next

Package: emacs;

Reported by: Wilfred Hughes <wilfred <at> editd.com>

Date: Fri, 9 Aug 2013 11:57:01 UTC

Severity: minor

Tags: notabug, wontfix

Found in version 24.3

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 15059 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Wilfred Hughes <wilfred <at> editd.com>, 15059 <at> debbugs.gnu.org
Subject: Re: bug#15059: 24.3; nth with negative index values
Date: Fri, 09 Aug 2013 21:31:26 -0400
Stefan Monnier wrote:

>> Easy to raise an error (unless something was relying on the behaviour
>> for -ve arguments?):
>
> We could try.  But note that Emacs-19.34 already behaved like that (I
> don't have any older version at hand to test).  Not sure it's important
> to "fix".

Oh, the elisp manual actually documents the -ve argument case:

   -- Function: nth n list
  [...]
  If N is negative, `nth' returns the first element of LIST.
  [...]
  (nth -3 '(1 2 3 4))
               => 1

All hope is lost!




This bug report was last modified 11 years and 286 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.