summaryrefslogtreecommitdiff
path: root/src/fns.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2005-12-11 05:10:08 +0000
committerRichard M. Stallman <rms@gnu.org>2005-12-11 05:10:08 +0000
commit06100606c1512e0f1bac929a10af057313b4cfbd (patch)
tree35762b77837c6f3b16c231d9917cbf667b686e03 /src/fns.c
parent356e6d8de4516169075b06405cb8283d544b78b6 (diff)
(Frequire): Treat evaluating from a source file
like loading the file.
Diffstat (limited to 'src/fns.c')
-rw-r--r--src/fns.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/fns.c b/src/fns.c
index 4cf21b543ac..6ed5051ee78 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -3559,14 +3559,20 @@ The normal messages at start and end of loading FILENAME are suppressed. */)
{
register Lisp_Object tem;
struct gcpro gcpro1, gcpro2;
+ int from_file = load_in_progress;
CHECK_SYMBOL (feature);
/* Record the presence of `require' in this file
even if the feature specified is already loaded.
But not more than once in any file,
- and not when we aren't loading a file. */
- if (load_in_progress)
+ and not when we aren't loading or reading from a file. */
+ if (!from_file)
+ for (tem = Vcurrent_load_list; CONSP (tem); tem = XCDR (tem))
+ if (NILP (XCDR (tem)) && STRINGP (XCAR (tem)))
+ from_file = 1;
+
+ if (from_file)
{
tem = Fcons (Qrequire, feature);
if (NILP (Fmember (tem, Vcurrent_load_list)))