GNU bug report logs -
#15059
24.3; nth with negative index values
Previous Next
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 #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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 (though
raising an error might be a sensible behaviour instead).
In GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.2)
of 2013-07-30 on -var-lib-archbuild-staging-x86_64-jgc
Windowing system distributor `The X.Org Foundation', version 11.0.11402000
Configured using:
`configure '--prefix=/usr' '--sysconfdir=/etc' '--libexecdir=/usr/lib'
'--localstatedir=/var' '--with-x-toolkit=gtk3' '--with-xft'
'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector
--param=ssp-buffer-size=4'
'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'
'CPPFLAGS=-D_FORTIFY_SOURCE=2''
Important settings:
value of $LANG: en_GB.utf8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
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.