+2012-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * fns.c (Fnreverse): Include the problem element when signalling an
+ error (bug#12677).
+
2012-10-18 Jan Djärv <jan.h.d@swipnet.se>
* nsterm.m (ns_select): Check writefds before call to
DEFUN ("nreverse", Fnreverse, Snreverse, 1, 1, 0,
doc: /* Reverse LIST by modifying cdr pointers.
-Return the reversed list. */)
+Return the reversed list. Expects a properly nil-terminated list. */)
(Lisp_Object list)
{
register Lisp_Object prev, tail, next;
while (!NILP (tail))
{
QUIT;
- CHECK_LIST_CONS (tail, list);
+ CHECK_LIST_CONS (tail, tail);
next = XCDR (tail);
Fsetcdr (tail, prev);
prev = tail;