X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/9f4ffeee436f71fc1253b27151c087fe5d0d3e45..507a173f5077b86152feb665421f5e6d47b7c85c:/src/fns.c diff --git a/src/fns.c b/src/fns.c index e705bdc58e..bc5331358a 100644 --- a/src/fns.c +++ b/src/fns.c @@ -1,6 +1,7 @@ /* Random utility Lisp functions. -Copyright (C) 1985-1987, 1993-1995, 1997-2013 Free Software Foundation, Inc. +Copyright (C) 1985-1987, 1993-1995, 1997-2014 Free Software Foundation, +Inc. This file is part of GNU Emacs. @@ -1537,15 +1538,12 @@ Write `(setq foo (delq element foo))' to be sure of correctly changing the value of a list `foo'. */) (register Lisp_Object elt, Lisp_Object list) { - register Lisp_Object tail, prev; - register Lisp_Object tem; + Lisp_Object tail, tortoise, prev = Qnil; + bool skip; - tail = list; - prev = Qnil; - while (CONSP (tail)) + FOR_EACH_TAIL (tail, list, tortoise, skip) { - CHECK_LIST_CONS (tail, list); - tem = XCAR (tail); + Lisp_Object tem = XCAR (tail); if (EQ (elt, tem)) { if (NILP (prev)) @@ -1555,8 +1553,6 @@ the value of a list `foo'. */) } else prev = tail; - tail = XCDR (tail); - QUIT; } return list; } @@ -2000,7 +1996,9 @@ internal_equal (Lisp_Object o1, Lisp_Object o2, int depth, bool props, error ("Stack overflow in equal"); if (NILP (ht)) { - Lisp_Object args[2] = { QCtest, Qeq }; + Lisp_Object args[2]; + args[0] = QCtest; + args[1] = Qeq; ht = Fmake_hash_table (2, args); } switch (XTYPE (o1))