1198 |
|
|
1199 |
/* Merge the list we've accumulated of globals from the current input source |
/* Merge the list we've accumulated of globals from the current input source |
1200 |
into the load_history variable. The details depend on whether |
into the load_history variable. The details depend on whether |
1201 |
the source has an associated file name or not. */ |
the source has an associated file name or not. |
1202 |
|
|
1203 |
|
FILENAME is the file name that we are loading from. |
1204 |
|
ENTIRE is 1 if loading that entire file, 0 if evaluating part of it. */ |
1205 |
|
|
1206 |
static void |
static void |
1207 |
build_load_history (stream, source) |
build_load_history (filename, entire) |
1208 |
FILE *stream; |
Lisp_Object filename; |
1209 |
Lisp_Object source; |
int entire; |
1210 |
{ |
{ |
1211 |
register Lisp_Object tail, prev, newelt; |
register Lisp_Object tail, prev, newelt; |
1212 |
register Lisp_Object tem, tem2; |
register Lisp_Object tem, tem2; |
1213 |
register int foundit, loading; |
register int foundit = 0; |
|
|
|
|
loading = stream || !NARROWED; |
|
1214 |
|
|
1215 |
tail = Vload_history; |
tail = Vload_history; |
1216 |
prev = Qnil; |
prev = Qnil; |
1217 |
foundit = 0; |
|
1218 |
while (CONSP (tail)) |
while (CONSP (tail)) |
1219 |
{ |
{ |
1220 |
tem = XCAR (tail); |
tem = XCAR (tail); |
1221 |
|
|
1222 |
/* Find the feature's previous assoc list... */ |
/* Find the feature's previous assoc list... */ |
1223 |
if (!NILP (Fequal (source, Fcar (tem)))) |
if (!NILP (Fequal (filename, Fcar (tem)))) |
1224 |
{ |
{ |
1225 |
foundit = 1; |
foundit = 1; |
1226 |
|
|
1227 |
/* If we're loading, remove it. */ |
/* If we're loading the entire file, remove old data. */ |
1228 |
if (loading) |
if (entire) |
1229 |
{ |
{ |
1230 |
if (NILP (prev)) |
if (NILP (prev)) |
1231 |
Vload_history = XCDR (tail); |
Vload_history = XCDR (tail); |
1257 |
QUIT; |
QUIT; |
1258 |
} |
} |
1259 |
|
|
1260 |
/* If we're loading, cons the new assoc onto the front of load-history, |
/* If we're loading an entire file, cons the new assoc onto the |
1261 |
the most-recently-loaded position. Also do this if we didn't find |
front of load-history, the most-recently-loaded position. Also |
1262 |
an existing member for the current source. */ |
do this if we didn't find an existing member for the file. */ |
1263 |
if (loading || !foundit) |
if (entire || !foundit) |
1264 |
Vload_history = Fcons (Fnreverse (Vcurrent_load_list), |
Vload_history = Fcons (Fnreverse (Vcurrent_load_list), |
1265 |
Vload_history); |
Vload_history); |
1266 |
} |
} |
1415 |
} |
} |
1416 |
} |
} |
1417 |
|
|
1418 |
build_load_history (stream, sourcename); |
build_load_history (sourcename, |
1419 |
|
stream || (start == BEG && end == Z)); |
1420 |
|
|
1421 |
UNGCPRO; |
UNGCPRO; |
1422 |
|
|
1423 |
unbind_to (count, Qnil); |
unbind_to (count, Qnil); |
3899 |
and means that SYMBOL was an autoload before this file redefined it |
and means that SYMBOL was an autoload before this file redefined it |
3900 |
as a function. |
as a function. |
3901 |
|
|
3902 |
For a preloaded file, the file name recorded is relative to the main Lisp |
During preloading, the file name recorded is relative to the main Lisp |
3903 |
directory. These names are converted to absolute by `file-loadhist-lookup'. */); |
directory. These file names are converted to absolute at startup. */); |
3904 |
Vload_history = Qnil; |
Vload_history = Qnil; |
3905 |
|
|
3906 |
DEFVAR_LISP ("load-file-name", &Vload_file_name, |
DEFVAR_LISP ("load-file-name", &Vload_file_name, |