From: Chong Yidong Date: Sat, 17 Dec 2005 15:51:00 +0000 (+0000) Subject: Revert last change. X-Git-Tag: emacs-pretest-22.0.90~5225 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=04df9646f2cc5a6c4a9b5e1e071cbd69c50e6dde;p=emacs.git Revert last change. --- diff --git a/src/ChangeLog b/src/ChangeLog index 97c51956cf7..d3fb40197b3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,8 +1,3 @@ -2005-12-17 Chong Yidong - - * print.c (print_preprocess): Just signal an error if print_depth - is exceeded. - 2005-12-17 Eli Zaretskii * .gdbinit: Set a breakpoint on w32_abort. diff --git a/src/print.c b/src/print.c index 20c359f9b69..ed6b402763a 100644 --- a/src/print.c +++ b/src/print.c @@ -1313,8 +1313,14 @@ print_preprocess (obj) /* Give up if we go so deep that print_object will get an error. */ /* See similar code in print_object. */ - if (print_depth >= PRINT_CIRCLE) - error ("Apparently circular structure being printed"); + /* Because print_preprocess "follows" nested lists in a slightly + different order from print_object, there is a risk of giving up + too soon. In that case, a deeply nested circular list may cause + print_object to loop. Using 3 * PRINT_CIRCLE should make this + possibility negligible, but at some point someone will have to + sit down and do a more careful analysis. -- cyd */ + if (print_depth >= 3 * PRINT_CIRCLE) + return; /* Avoid infinite recursion for circular nested structure in the case where Vprint_circle is nil. */