changeset 61417:93f7c57762e3

(Vloads_in_progress): Add extern. (Frequire): Don't do LOADHIST_ATTACH if Vloads_in_progress is nil.
author Richard M. Stallman <rms@gnu.org>
date Sun, 10 Apr 2005 00:28:00 +0000
parents 89b8166ef056
children 02c939955b7a
files src/fns.c
diffstat 1 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/fns.c	Sat Apr 09 23:51:18 2005 +0000
+++ b/src/fns.c	Sun Apr 10 00:28:00 2005 +0000
@@ -66,6 +66,7 @@
 extern int minibuffer_auto_raise;
 extern Lisp_Object minibuf_window;
 extern Lisp_Object Vlocale_coding_system;
+extern Lisp_Object Vloads_in_progress;
 
 Lisp_Object Qstring_lessp, Qprovide, Qrequire;
 Lisp_Object Qyes_or_no_p_history;
@@ -3444,9 +3445,15 @@
   CHECK_SYMBOL (feature);
 
   /* Record the presence of `require' in this file
-     even if the feature specified is already loaded.  */
-  LOADHIST_ATTACH (Fcons (Qrequire, feature));
-
+     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 (! NILP (Vloads_in_progress))
+    {
+      tem = Fcons (Qrequire, feature);
+      if (NILP (Fmember (tem, Vcurrent_load_list)))
+	LOADHIST_ATTACH (tem);
+    }
   tem = Fmemq (feature, Vfeatures);
 
   if (NILP (tem))