Mercurial > emacs
changeset 102267:12ffc72c0bbc
* lread.c (Fload): Stop checking Vloads_in_progress and signal
error as soon as a recursive load is detected.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Wed, 25 Feb 2009 12:47:23 +0000 |
parents | 23cb90d39b97 |
children | 0d0e5598b742 |
files | src/ChangeLog src/lread.c |
diffstat | 2 files changed, 11 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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 <lekktu@gmail.com> + + * lread.c (Fload): Stop checking Vloads_in_progress as soon as + a recursive load is detected. + 2009-02-24 Adrian Robert <Adrian.B.Robert@gmail.com> * nsterm.m (ns_ring_bell): Convert rect to window coordinates
--- 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); }