]> 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 27927d73abec6357206a6bcea66a7361a95b6abc..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
@@ -262,7 +262,7 @@ concat (nargs, args, target_type, last_special)
            || XTYPE (this) == Lisp_Compiled))
        {
          if (XTYPE (this) == Lisp_Int)
-            args[argnum] = Fint_to_string (this);
+            args[argnum] = Fnumber_to_string (this);
          else
            args[argnum] = wrong_type_argument (Qsequencep, this);
        }
@@ -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,19 +1109,18 @@ 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_filtered_event (1, 0, 0);
+      cursor_in_echo_area = 0;
+      /* If we need to quit, quit with cursor_in_echo_area = 0.  */
+      QUIT;
 
-      obj = read_char (0, 0, 0, Qnil, 0);
       key = Fmake_vector (make_number (1), obj);
       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;
@@ -1157,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;
 }
@@ -1269,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;
 }
 
@@ -1283,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;
@@ -1310,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\