]> code.delx.au - gnu-emacs/blobdiff - src/fns.c
(wait_for_termination): Copy code from 18.59 (but sans BSD4_1 alternatives).
[gnu-emacs] / src / fns.c
index 14a2ce5b2298332a80a57a1c224f00f149e2c2b2..328cf984c71f455bab27791e009016af11621698 100644 (file)
--- a/src/fns.c
+++ b/src/fns.c
@@ -31,7 +31,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "buffer.h"
 #include "keyboard.h"
 
-Lisp_Object Qstring_lessp;
+Lisp_Object Qstring_lessp, Qprovide, Qrequire;
 
 static Lisp_Object internal_equal ();
 \f
@@ -844,7 +844,8 @@ do_cdr:
     }
 #endif
   if (XTYPE (o1) != XTYPE (o2)) return Qnil;
-  if (XTYPE (o1) == Lisp_Cons)
+  if (XTYPE (o1) == Lisp_Cons
+      || XTYPE (o1) == Lisp_Overlay)
     {
       Lisp_Object v1;
       v1 = internal_equal (Fcar (o1), Fcar (o2), depth + 1);
@@ -1108,10 +1109,10 @@ Also accepts Space to mean yes, or Delete to mean no.")
 
   while (1)
     {
-      message ("%s(y or n) ", XSTRING (xprompt)->data);
       cursor_in_echo_area = 1;
+      message ("%s(y or n) ", XSTRING (xprompt)->data);
 
-      obj = read_char (0, 0, 0, Qnil, 0);
+      obj = read_filtered_event (1, 0, 0);
       cursor_in_echo_area = 0;
       /* If we need to quit, quit with cursor_in_echo_area = 0.  */
       QUIT;
@@ -1120,11 +1121,6 @@ Also accepts Space to mean yes, or Delete to mean no.")
       def = Flookup_key (map, key);
       answer_string = Fsingle_key_description (obj);
 
-      cursor_in_echo_area = -1;
-      message ("%s(y or n) %s", XSTRING (xprompt)->data,
-              XSTRING (answer_string)->data);
-      cursor_in_echo_area = ocech;
-
       if (EQ (def, intern ("skip")))
        {
          answer = 0;
@@ -1161,7 +1157,12 @@ Also accepts Space to mean yes, or Delete to mean no.")
     }
   UNGCPRO;
 
-  message ("%s(y or n) %c", XSTRING (xprompt)->data, answer ? 'y' : 'n');
+  if (! noninteractive)
+    {
+      cursor_in_echo_area = -1;
+      message ("%s(y or n) %c", XSTRING (xprompt)->data, answer ? 'y' : 'n');
+      cursor_in_echo_area = ocech;
+    }
 
   return answer ? Qt : Qnil;
 }
@@ -1273,6 +1274,7 @@ DEFUN ("provide", Fprovide, Sprovide, 1, 1, 0,
   tem = Fmemq (feature, Vfeatures);
   if (NILP (tem))
     Vfeatures = Fcons (feature, Vfeatures);
+  LOADHIST_ATTACH (Fcons (Qprovide, feature));
   return feature;
 }
 
@@ -1287,6 +1289,7 @@ If FILENAME is omitted, the printname of FEATURE is used as the file name.")
   register Lisp_Object tem;
   CHECK_SYMBOL (feature, 0);
   tem = Fmemq (feature, Vfeatures);
+  LOADHIST_ATTACH (Fcons (Qrequire, feature));
   if (NILP (tem))
     {
       int count = specpdl_ptr - specpdl;
@@ -1314,6 +1317,10 @@ syms_of_fns ()
 {
   Qstring_lessp = intern ("string-lessp");
   staticpro (&Qstring_lessp);
+  Qprovide = intern ("provide");
+  staticpro (&Qprovide);
+  Qrequire = intern ("require");
+  staticpro (&Qrequire);
 
   DEFVAR_LISP ("features", &Vfeatures,
     "A list of symbols which are the features of the executing emacs.\n\