all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#15059: 24.3; nth with negative index values
@ 2013-08-09 11:55 Wilfred Hughes
  2013-08-09 15:51 ` Andreas Schwab
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Wilfred Hughes @ 2013-08-09 11:55 UTC (permalink / raw)
  To: 15059

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





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-08-13  7:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-09 11:55 bug#15059: 24.3; nth with negative index values Wilfred Hughes
2013-08-09 15:51 ` Andreas Schwab
2013-08-09 18:52 ` Glenn Morris
2013-08-09 21:58   ` Stefan Monnier
2013-08-10  1:31     ` Glenn Morris
2013-08-12 10:10 ` Wilfred Hughes
2013-08-12 14:09   ` Stefan Monnier
2013-08-13  7:15     ` Glenn Morris

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.