]> code.delx.au - gnu-emacs/blobdiff - src/fns.c
* lread.c (read_char): Add an extern declaration for this,
[gnu-emacs] / src / fns.c
index 855e20b78b4aef32f32a360085cde6e479e6af4b..6eb97d4683ab749b612e001f0396e96efde1d07d 100644 (file)
--- a/src/fns.c
+++ b/src/fns.c
@@ -29,6 +29,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "commands.h"
 
 #include "buffer.h"
+#include "keyboard.h"
 
 Lisp_Object Qstring_lessp;
 
@@ -620,7 +621,7 @@ to be sure of changing the value of `foo'.")
   while (!NILP (tail))
     {
       tem = Fcar (tail);
-      if (Fequal (elt, tem))
+      if (! NILP (Fequal (elt, tem)))
        {
          if (NILP (prev))
            list = Fcdr (tail);
@@ -1101,7 +1102,7 @@ Also accepts Space to mean yes, or Delete to mean no.")
       message ("%s(y or n) ", XSTRING (xprompt)->data);
       cursor_in_echo_area = 1;
 
-      obj = read_char (0);
+      obj = read_char (0, 0, 0, Qnil, 0);
       if (XTYPE (obj) == Lisp_Int)
        ans = XINT (obj);
       else
@@ -1114,6 +1115,10 @@ Also accepts Space to mean yes, or Delete to mean no.")
       if (ans == 7 || ans == '\035')
        Vquit_flag = Qt;
       QUIT;
+
+      /* If we don't clear this, then the next call to read_char will
+        return quit_char again, and we'll enter an infinite loop.  */
+      Vquit_flag = Qnil;
       if (ans >= 0)
        ans = DOWNCASE (ans);
       if (ans == 'y' || ans == ' ')
@@ -1185,7 +1190,7 @@ and can edit it until it as been confirmed.")
       Fding (Qnil);
       Fdiscard_input ();
       message ("Please answer yes or no.");
-      Fsleep_for (make_number (2));
+      Fsleep_for (make_number (2), Qnil);
     }
   UNGCPRO;
 }