Mercurial > emacs
diff src/lread.c @ 83395:b31326248cf6
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
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Tue, 01 Nov 2005 06:23:08 +0000 |
parents | 732c5740ca8f 087e7eef40d2 |
children | 693e794b57bf |
line wrap: on
line diff
--- a/src/lread.c Sat Oct 29 11:50:12 2005 +0000 +++ b/src/lread.c Tue Nov 01 06:23:08 2005 +0000 @@ -1199,33 +1199,34 @@ /* Merge the list we've accumulated of globals from the current input source into the load_history variable. The details depend on whether - the source has an associated file name or not. */ + the source has an associated file name or not. + + FILENAME is the file name that we are loading from. + ENTIRE is 1 if loading that entire file, 0 if evaluating part of it. */ static void -build_load_history (stream, source) - FILE *stream; - Lisp_Object source; +build_load_history (filename, entire) + Lisp_Object filename; + int entire; { register Lisp_Object tail, prev, newelt; register Lisp_Object tem, tem2; - register int foundit, loading; - - loading = stream || !NARROWED; + register int foundit = 0; tail = Vload_history; prev = Qnil; - foundit = 0; + while (CONSP (tail)) { tem = XCAR (tail); /* Find the feature's previous assoc list... */ - if (!NILP (Fequal (source, Fcar (tem)))) + if (!NILP (Fequal (filename, Fcar (tem)))) { foundit = 1; - /* If we're loading, remove it. */ - if (loading) + /* If we're loading the entire file, remove old data. */ + if (entire) { if (NILP (prev)) Vload_history = XCDR (tail); @@ -1257,10 +1258,10 @@ QUIT; } - /* If we're loading, cons the new assoc onto the front of load-history, - the most-recently-loaded position. Also do this if we didn't find - an existing member for the current source. */ - if (loading || !foundit) + /* If we're loading an entire file, cons the new assoc onto the + front of load-history, the most-recently-loaded position. Also + do this if we didn't find an existing member for the file. */ + if (entire || !foundit) Vload_history = Fcons (Fnreverse (Vcurrent_load_list), Vload_history); } @@ -1415,7 +1416,9 @@ } } - build_load_history (stream, sourcename); + build_load_history (sourcename, + stream || (start == BEG && end == Z)); + UNGCPRO; unbind_to (count, Qnil); @@ -3897,8 +3900,8 @@ and means that SYMBOL was an autoload before this file redefined it as a function. -For a preloaded file, the file name recorded is relative to the main Lisp -directory. These names are converted to absolute by `file-loadhist-lookup'. */); +During preloading, the file name recorded is relative to the main Lisp +directory. These file names are converted to absolute at startup. */); Vload_history = Qnil; DEFVAR_LISP ("load-file-name", &Vload_file_name,