# HG changeset patch # User Juanma Barranquero # Date 1235566043 0 # Node ID 12ffc72c0bbc5dd6544ce4f1463e4b6b122280bc # Parent 23cb90d39b97278f91837c75ca4f146a40c811de * lread.c (Fload): Stop checking Vloads_in_progress and signal error as soon as a recursive load is detected. diff -r 23cb90d39b97 -r 12ffc72c0bbc src/ChangeLog --- a/src/ChangeLog Wed Feb 25 12:31:58 2009 +0000 +++ b/src/ChangeLog Wed Feb 25 12:47:23 2009 +0000 @@ -1,3 +1,8 @@ +2009-02-25 Juanma Barranquero + + * lread.c (Fload): Stop checking Vloads_in_progress as soon as + a recursive load is detected. + 2009-02-24 Adrian Robert * nsterm.m (ns_ring_bell): Convert rect to window coordinates diff -r 23cb90d39b97 -r 12ffc72c0bbc src/lread.c --- a/src/lread.c Wed Feb 25 12:31:58 2009 +0000 +++ b/src/lread.c Wed Feb 25 12:47:23 2009 +0000 @@ -1113,14 +1113,12 @@ int count = 0; Lisp_Object tem; for (tem = Vloads_in_progress; CONSP (tem); tem = XCDR (tem)) - if (!NILP (Fequal (found, XCAR (tem)))) - count++; - if (count > 3) - { - if (fd >= 0) - emacs_close (fd); - signal_error ("Recursive load", Fcons (found, Vloads_in_progress)); - } + if (!NILP (Fequal (found, XCAR (tem))) && (++count > 3)) + { + if (fd >= 0) + emacs_close (fd); + signal_error ("Recursive load", Fcons (found, Vloads_in_progress)); + } record_unwind_protect (record_load_unwind, Vloads_in_progress); Vloads_in_progress = Fcons (found, Vloads_in_progress); }