diff options
| author | Juanma Barranquero | 2009-02-25 12:47:23 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2009-02-25 12:47:23 +0000 |
| commit | 8fc457448c63cca8e21a85c42907b2d079ff1442 (patch) | |
| tree | 1ea34da99070b510992a3e9fa5368e42c7a10ef4 /src | |
| parent | 96ad1a2f46bad7a5bfb0baa8a5dd9373f4cce707 (diff) | |
| download | emacs-8fc457448c63cca8e21a85c42907b2d079ff1442.tar.gz emacs-8fc457448c63cca8e21a85c42907b2d079ff1442.zip | |
* lread.c (Fload): Stop checking Vloads_in_progress and signal
error as soon as a recursive load is detected.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/lread.c | 14 |
2 files changed, 11 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 60dc389335b..120c0929684 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2009-02-25 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * lread.c (Fload): Stop checking Vloads_in_progress as soon as | ||
| 4 | a recursive load is detected. | ||
| 5 | |||
| 1 | 2009-02-24 Adrian Robert <Adrian.B.Robert@gmail.com> | 6 | 2009-02-24 Adrian Robert <Adrian.B.Robert@gmail.com> |
| 2 | 7 | ||
| 3 | * nsterm.m (ns_ring_bell): Convert rect to window coordinates | 8 | * nsterm.m (ns_ring_bell): Convert rect to window coordinates |
diff --git a/src/lread.c b/src/lread.c index e5894d6d3e9..063adba1d9a 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -1113,14 +1113,12 @@ Return t if the file exists and loads successfully. */) | |||
| 1113 | int count = 0; | 1113 | int count = 0; |
| 1114 | Lisp_Object tem; | 1114 | Lisp_Object tem; |
| 1115 | for (tem = Vloads_in_progress; CONSP (tem); tem = XCDR (tem)) | 1115 | for (tem = Vloads_in_progress; CONSP (tem); tem = XCDR (tem)) |
| 1116 | if (!NILP (Fequal (found, XCAR (tem)))) | 1116 | if (!NILP (Fequal (found, XCAR (tem))) && (++count > 3)) |
| 1117 | count++; | 1117 | { |
| 1118 | if (count > 3) | 1118 | if (fd >= 0) |
| 1119 | { | 1119 | emacs_close (fd); |
| 1120 | if (fd >= 0) | 1120 | signal_error ("Recursive load", Fcons (found, Vloads_in_progress)); |
| 1121 | emacs_close (fd); | 1121 | } |
| 1122 | signal_error ("Recursive load", Fcons (found, Vloads_in_progress)); | ||
| 1123 | } | ||
| 1124 | record_unwind_protect (record_load_unwind, Vloads_in_progress); | 1122 | record_unwind_protect (record_load_unwind, Vloads_in_progress); |
| 1125 | Vloads_in_progress = Fcons (found, Vloads_in_progress); | 1123 | Vloads_in_progress = Fcons (found, Vloads_in_progress); |
| 1126 | } | 1124 | } |