aboutsummaryrefslogtreecommitdiffstats
path: root/src/lread.c
diff options
context:
space:
mode:
authorKaroly Lorentey2005-11-01 06:23:08 +0000
committerKaroly Lorentey2005-11-01 06:23:08 +0000
commitcd0cf71c4f41023a8d9c20b3a26e44b980992b5a (patch)
treeb763cfec551254e2228335be4e218ed7a9a19109 /src/lread.c
parentc40bb1ba81a5df164f0b9b61e3480c55808717b7 (diff)
parent895725e10c0fb68ed21abb48183cc8843bcaadf3 (diff)
downloademacs-cd0cf71c4f41023a8d9c20b3a26e44b980992b5a.tar.gz
emacs-cd0cf71c4f41023a8d9c20b3a26e44b980992b5a.zip
Merged from miles@gnu.org--gnu-2005 (patch 142-148, 615-628)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-615 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-616 Add lisp/mh-e/.arch-inventory * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-617 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-618 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-619 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-620 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-621 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-622 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-623 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-624 Update from CVS: lisp/smerge-mode.el: Add 'tools' to file keywords. * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-625 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-626 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-627 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-628 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-142 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-143 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-144 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-145 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-146 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-147 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-148 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-435
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c39
1 files changed, 21 insertions, 18 deletions
diff --git a/src/lread.c b/src/lread.c
index 43c7bf6cfc2..d51e6443288 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1199,33 +1199,34 @@ openp (path, str, suffixes, storeptr, predicate)
1199 1199
1200/* Merge the list we've accumulated of globals from the current input source 1200/* Merge the list we've accumulated of globals from the current input source
1201 into the load_history variable. The details depend on whether 1201 into the load_history variable. The details depend on whether
1202 the source has an associated file name or not. */ 1202 the source has an associated file name or not.
1203
1204 FILENAME is the file name that we are loading from.
1205 ENTIRE is 1 if loading that entire file, 0 if evaluating part of it. */
1203 1206
1204static void 1207static void
1205build_load_history (stream, source) 1208build_load_history (filename, entire)
1206 FILE *stream; 1209 Lisp_Object filename;
1207 Lisp_Object source; 1210 int entire;
1208{ 1211{
1209 register Lisp_Object tail, prev, newelt; 1212 register Lisp_Object tail, prev, newelt;
1210 register Lisp_Object tem, tem2; 1213 register Lisp_Object tem, tem2;
1211 register int foundit, loading; 1214 register int foundit = 0;
1212
1213 loading = stream || !NARROWED;
1214 1215
1215 tail = Vload_history; 1216 tail = Vload_history;
1216 prev = Qnil; 1217 prev = Qnil;
1217 foundit = 0; 1218
1218 while (CONSP (tail)) 1219 while (CONSP (tail))
1219 { 1220 {
1220 tem = XCAR (tail); 1221 tem = XCAR (tail);
1221 1222
1222 /* Find the feature's previous assoc list... */ 1223 /* Find the feature's previous assoc list... */
1223 if (!NILP (Fequal (source, Fcar (tem)))) 1224 if (!NILP (Fequal (filename, Fcar (tem))))
1224 { 1225 {
1225 foundit = 1; 1226 foundit = 1;
1226 1227
1227 /* If we're loading, remove it. */ 1228 /* If we're loading the entire file, remove old data. */
1228 if (loading) 1229 if (entire)
1229 { 1230 {
1230 if (NILP (prev)) 1231 if (NILP (prev))
1231 Vload_history = XCDR (tail); 1232 Vload_history = XCDR (tail);
@@ -1257,10 +1258,10 @@ build_load_history (stream, source)
1257 QUIT; 1258 QUIT;
1258 } 1259 }
1259 1260
1260 /* If we're loading, cons the new assoc onto the front of load-history, 1261 /* 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 1262 front of load-history, the most-recently-loaded position. Also
1262 an existing member for the current source. */ 1263 do this if we didn't find an existing member for the file. */
1263 if (loading || !foundit) 1264 if (entire || !foundit)
1264 Vload_history = Fcons (Fnreverse (Vcurrent_load_list), 1265 Vload_history = Fcons (Fnreverse (Vcurrent_load_list),
1265 Vload_history); 1266 Vload_history);
1266} 1267}
@@ -1415,7 +1416,9 @@ readevalloop (readcharfun, stream, sourcename, evalfun,
1415 } 1416 }
1416 } 1417 }
1417 1418
1418 build_load_history (stream, sourcename); 1419 build_load_history (sourcename,
1420 stream || (start == BEG && end == Z));
1421
1419 UNGCPRO; 1422 UNGCPRO;
1420 1423
1421 unbind_to (count, Qnil); 1424 unbind_to (count, Qnil);
@@ -3897,8 +3900,8 @@ An element `(t . SYMBOL)' precedes an entry `(defun . FUNCTION)',
3897and means that SYMBOL was an autoload before this file redefined it 3900and means that SYMBOL was an autoload before this file redefined it
3898as a function. 3901as a function.
3899 3902
3900For a preloaded file, the file name recorded is relative to the main Lisp 3903During preloading, the file name recorded is relative to the main Lisp
3901directory. These names are converted to absolute by `file-loadhist-lookup'. */); 3904directory. These file names are converted to absolute at startup. */);
3902 Vload_history = Qnil; 3905 Vload_history = Qnil;
3903 3906
3904 DEFVAR_LISP ("load-file-name", &Vload_file_name, 3907 DEFVAR_LISP ("load-file-name", &Vload_file_name,