]> code.delx.au - gnu-emacs/commitdiff
(Vloads_in_progress): Add extern.
authorRichard M. Stallman <rms@gnu.org>
Sun, 10 Apr 2005 00:28:00 +0000 (00:28 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 10 Apr 2005 00:28:00 +0000 (00:28 +0000)
(Frequire): Don't do LOADHIST_ATTACH if Vloads_in_progress is nil.

src/fns.c

index 9a3121a3391f7c75bcb4b315d61ca4d7ae6b65ed..d85a6adfeb1e6035ed864d47cb8a06f0757b8f8d 100644 (file)
--- a/src/fns.c
+++ b/src/fns.c
@@ -66,6 +66,7 @@ int use_file_dialog;
 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 @@ The normal messages at start and end of loading FILENAME are suppressed.  */)
   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))