diff options
| author | Ken Raeburn | 2009-07-25 07:36:17 +0000 |
|---|---|---|
| committer | Ken Raeburn | 2009-07-25 07:36:17 +0000 |
| commit | 2baf5e7610491eedb042b89056324d7f79e8a288 (patch) | |
| tree | 7d7a96d5a8eb07c9ff4913339d9a61914e4bbf58 | |
| parent | 1395c6f54c37e5ee4e870d39180b07dba2060b73 (diff) | |
| download | emacs-2baf5e7610491eedb042b89056324d7f79e8a288.tar.gz emacs-2baf5e7610491eedb042b89056324d7f79e8a288.zip | |
* lread.c: Rewrite 2009-07-21 changes.
(load_depth): Deleted.
(Qload_in_progress): New variable.
(load_unwind): Don't reference load_depth or load_in_progress.
(Fload): Likewise; specbind Qload_in_progress instead.
(init_lread): Don't initialize load_depth.
(syms_of_lread): Initialize and protect Qload_in_progress.
| -rw-r--r-- | src/ChangeLog | 10 | ||||
| -rw-r--r-- | src/lread.c | 12 |
2 files changed, 14 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 7814f8a637e..00cc2e38a88 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2009-07-25 Ken Raeburn <raeburn@raeburn.org> | ||
| 2 | |||
| 3 | * lread.c: Rewrite 2009-07-21 changes. | ||
| 4 | (load_depth): Deleted. | ||
| 5 | (Qload_in_progress): New variable. | ||
| 6 | (load_unwind): Don't reference load_depth or load_in_progress. | ||
| 7 | (Fload): Likewise; specbind Qload_in_progress instead. | ||
| 8 | (init_lread): Don't initialize load_depth. | ||
| 9 | (syms_of_lread): Initialize and protect Qload_in_progress. | ||
| 10 | |||
| 1 | 2009-07-24 Adrian Robert <Adrian.B.Robert@gmail.com> | 11 | 2009-07-24 Adrian Robert <Adrian.B.Robert@gmail.com> |
| 2 | 12 | ||
| 3 | * nsfont.m (ns_findfonts): Correctly return fallback in match case. | 13 | * nsfont.m (ns_findfonts): Correctly return fallback in match case. |
diff --git a/src/lread.c b/src/lread.c index ec62c7a8933..8741bff6284 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -99,9 +99,7 @@ extern Lisp_Object Qfile_exists_p; | |||
| 99 | 99 | ||
| 100 | /* non-zero if inside `load' */ | 100 | /* non-zero if inside `load' */ |
| 101 | int load_in_progress; | 101 | int load_in_progress; |
| 102 | 102 | static Lisp_Object Qload_in_progress; | |
| 103 | /* Depth of nested `load' invocations. */ | ||
| 104 | int load_depth; | ||
| 105 | 103 | ||
| 106 | /* Directory in which the sources were found. */ | 104 | /* Directory in which the sources were found. */ |
| 107 | Lisp_Object Vsource_directory; | 105 | Lisp_Object Vsource_directory; |
| @@ -1253,8 +1251,7 @@ Return t if the file exists and loads successfully. */) | |||
| 1253 | specbind (Qinhibit_file_name_operation, Qnil); | 1251 | specbind (Qinhibit_file_name_operation, Qnil); |
| 1254 | load_descriptor_list | 1252 | load_descriptor_list |
| 1255 | = Fcons (make_number (fileno (stream)), load_descriptor_list); | 1253 | = Fcons (make_number (fileno (stream)), load_descriptor_list); |
| 1256 | load_depth++; | 1254 | specbind (Qload_in_progress, Qt); |
| 1257 | load_in_progress = 1; | ||
| 1258 | if (! version || version >= 22) | 1255 | if (! version || version >= 22) |
| 1259 | readevalloop (Qget_file_char, stream, hist_file_name, | 1256 | readevalloop (Qget_file_char, stream, hist_file_name, |
| 1260 | Feval, 0, Qnil, Qnil, Qnil, Qnil); | 1257 | Feval, 0, Qnil, Qnil, Qnil, Qnil); |
| @@ -1316,8 +1313,6 @@ load_unwind (arg) /* used as unwind-protect function in load */ | |||
| 1316 | fclose (stream); | 1313 | fclose (stream); |
| 1317 | UNBLOCK_INPUT; | 1314 | UNBLOCK_INPUT; |
| 1318 | } | 1315 | } |
| 1319 | if (--load_depth < 0) load_depth = 0; | ||
| 1320 | load_in_progress = load_depth > 0; | ||
| 1321 | return Qnil; | 1316 | return Qnil; |
| 1322 | } | 1317 | } |
| 1323 | 1318 | ||
| @@ -4134,7 +4129,6 @@ init_lread () | |||
| 4134 | Vvalues = Qnil; | 4129 | Vvalues = Qnil; |
| 4135 | 4130 | ||
| 4136 | load_in_progress = 0; | 4131 | load_in_progress = 0; |
| 4137 | load_depth = 0; | ||
| 4138 | Vload_file_name = Qnil; | 4132 | Vload_file_name = Qnil; |
| 4139 | 4133 | ||
| 4140 | load_descriptor_list = Qnil; | 4134 | load_descriptor_list = Qnil; |
| @@ -4258,6 +4252,8 @@ customize `jka-compr-load-suffixes' rather than the present variable. */); | |||
| 4258 | 4252 | ||
| 4259 | DEFVAR_BOOL ("load-in-progress", &load_in_progress, | 4253 | DEFVAR_BOOL ("load-in-progress", &load_in_progress, |
| 4260 | doc: /* Non-nil if inside of `load'. */); | 4254 | doc: /* Non-nil if inside of `load'. */); |
| 4255 | Qload_in_progress = intern ("load-in-progress"); | ||
| 4256 | staticpro (&Qload_in_progress); | ||
| 4261 | 4257 | ||
| 4262 | DEFVAR_LISP ("after-load-alist", &Vafter_load_alist, | 4258 | DEFVAR_LISP ("after-load-alist", &Vafter_load_alist, |
| 4263 | doc: /* An alist of expressions to be evalled when particular files are loaded. | 4259 | doc: /* An alist of expressions to be evalled when particular files are loaded. |