]> git.eshelyaron.com Git - emacs.git/commit
Make FOR_EACH_TAIL more like other FOR_EACH macros
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 7 Feb 2017 01:15:14 +0000 (17:15 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 7 Feb 2017 01:34:41 +0000 (17:34 -0800)
commit03a012a79679c730634537f966200878bfd1c0b4
tree66647b38bffa3eb904da993d9d583cc770c443df
parentd45dbccc5d2360818e70bbb0bc816c62c8cf6cbe
Make FOR_EACH_TAIL more like other FOR_EACH macros

See comments by Stefan Monnier in:
http://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00181.html
and by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2017-02/msg00207.html
* src/fns.c (internal_equal): Do not bypass check for depth
overflow when tail-recursing via a dotted list tail or an overlay
plist, to avoid a rare infloop.
* src/lisp.h (FOR_EACH_TAIL, FOR_EACH_TAIL_SAFE): Take TAIL as an
arg, and update it at each iteration, rather than have callers
access it.tail.  All callers changed.
(FOR_EACH_TAIL): Do not check for dotted lists, as this is now
the caller’s responsibility.  All callers changed.
(FOR_EACH_TAIL_CONS): Remove.  All callers changed.
(struct for_each_tail_internal.tail): Remove; no longer needed.
(FOR_EACH_TAIL_INTERNAL): Remove dotted arg, and set the tail
arg each time through the loop.  All callers changed.
src/fns.c
src/lisp.h
src/xdisp.c