From: Andreas Schwab Date: Fri, 29 Jan 2016 10:18:42 +0000 (+0100) Subject: Re-enable checks in member, memql, delete to complain about non-lists X-Git-Tag: emacs-26.0.90~2801 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d27c8078ef766dae3587bc82b70128a70efaa223;p=emacs.git Re-enable checks in member, memql, delete to complain about non-lists * fns.c (Fmember, Fmemql, Fdelete): Revert 2007-10-16 change. --- diff --git a/src/fns.c b/src/fns.c index 86ad333702e..d1808440966 100644 --- a/src/fns.c +++ b/src/fns.c @@ -1349,7 +1349,7 @@ The value is actually the tail of LIST whose car is ELT. */) (register Lisp_Object elt, Lisp_Object list) { register Lisp_Object tail; - for (tail = list; CONSP (tail); tail = XCDR (tail)) + for (tail = list; !NILP (tail); tail = XCDR (tail)) { register Lisp_Object tem; CHECK_LIST_CONS (tail, list); @@ -1397,7 +1397,7 @@ The value is actually the tail of LIST whose car is ELT. */) if (!FLOATP (elt)) return Fmemq (elt, list); - for (tail = list; CONSP (tail); tail = XCDR (tail)) + for (tail = list; !NILP (tail); tail = XCDR (tail)) { register Lisp_Object tem; CHECK_LIST_CONS (tail, list); @@ -1710,7 +1710,7 @@ changing the value of a sequence `foo'. */) { Lisp_Object tail, prev; - for (tail = seq, prev = Qnil; CONSP (tail); tail = XCDR (tail)) + for (tail = seq, prev = Qnil; !NILP (tail); tail = XCDR (tail)) { CHECK_LIST_CONS (tail, seq);