aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKen Raeburn2009-07-21 09:26:43 +0000
committerKen Raeburn2009-07-21 09:26:43 +0000
commitece435a536f60c9f3300d1e5d4f2af051e88cbf1 (patch)
tree031850479d5f79fc87a9dde1fa0456af4ebcc380 /src
parent0b5546d610aafd65b2c1ef1024a35b10516543a8 (diff)
downloademacs-ece435a536f60c9f3300d1e5d4f2af051e88cbf1.tar.gz
emacs-ece435a536f60c9f3300d1e5d4f2af051e88cbf1.zip
(load_depth): New variable.
(Fload, load_unwind, init_lread): Set it to the load recursion depth; set load_in_progress as a simple boolean based on the current load_depth. (Bug#3892)
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/lread.c10
2 files changed, 15 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index b3c3fbd3f4e..5f4c417f058 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12009-07-21 Ken Raeburn <raeburn@raeburn.org>
2
3 * lread.c (load_depth): New variable.
4 (Fload, load_unwind, init_lread): Set it to the load recursion
5 depth; set load_in_progress as a simple boolean based on the
6 current load_depth. (Bug#3892)
7
12009-07-20 Adrian Robert <Adrian.B.Robert@gmail.com> 82009-07-20 Adrian Robert <Adrian.B.Robert@gmail.com>
2 9
3 * nsfont.m (ns_has_attribute): Remove. 10 * nsfont.m (ns_has_attribute): Remove.
diff --git a/src/lread.c b/src/lread.c
index cb3f5b04633..ec62c7a8933 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -100,6 +100,9 @@ extern Lisp_Object Qfile_exists_p;
100/* non-zero if inside `load' */ 100/* non-zero if inside `load' */
101int load_in_progress; 101int load_in_progress;
102 102
103/* Depth of nested `load' invocations. */
104int load_depth;
105
103/* Directory in which the sources were found. */ 106/* Directory in which the sources were found. */
104Lisp_Object Vsource_directory; 107Lisp_Object Vsource_directory;
105 108
@@ -1250,7 +1253,8 @@ Return t if the file exists and loads successfully. */)
1250 specbind (Qinhibit_file_name_operation, Qnil); 1253 specbind (Qinhibit_file_name_operation, Qnil);
1251 load_descriptor_list 1254 load_descriptor_list
1252 = Fcons (make_number (fileno (stream)), load_descriptor_list); 1255 = Fcons (make_number (fileno (stream)), load_descriptor_list);
1253 load_in_progress++; 1256 load_depth++;
1257 load_in_progress = 1;
1254 if (! version || version >= 22) 1258 if (! version || version >= 22)
1255 readevalloop (Qget_file_char, stream, hist_file_name, 1259 readevalloop (Qget_file_char, stream, hist_file_name,
1256 Feval, 0, Qnil, Qnil, Qnil, Qnil); 1260 Feval, 0, Qnil, Qnil, Qnil, Qnil);
@@ -1312,7 +1316,8 @@ load_unwind (arg) /* used as unwind-protect function in load */
1312 fclose (stream); 1316 fclose (stream);
1313 UNBLOCK_INPUT; 1317 UNBLOCK_INPUT;
1314 } 1318 }
1315 if (--load_in_progress < 0) load_in_progress = 0; 1319 if (--load_depth < 0) load_depth = 0;
1320 load_in_progress = load_depth > 0;
1316 return Qnil; 1321 return Qnil;
1317} 1322}
1318 1323
@@ -4129,6 +4134,7 @@ init_lread ()
4129 Vvalues = Qnil; 4134 Vvalues = Qnil;
4130 4135
4131 load_in_progress = 0; 4136 load_in_progress = 0;
4137 load_depth = 0;
4132 Vload_file_name = Qnil; 4138 Vload_file_name = Qnil;
4133 4139
4134 load_descriptor_list = Qnil; 4140 load_descriptor_list = Qnil;