]> code.delx.au - gnu-emacs/blobdiff - src/fns.c
* fns.c: #include keyboard.h.
[gnu-emacs] / src / fns.c
index 89afc34362edaa6e2d89fb00d013d13b0e2bed9a..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;
 
@@ -184,7 +185,7 @@ DEFUN ("append", Fappend, Sappend, 0, MANY, 0,
   "Concatenate all the arguments and make the result a list.\n\
 The result is a list whose elements are the elements of all the arguments.\n\
 Each argument may be a list, vector or string.\n\
-The last argument is not copied if it is a list.")
+The last argument is not copied, just used as the tail of the new list.")
   (nargs, args)
      int nargs;
      Lisp_Object *args;
@@ -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 == ' ')
@@ -1170,7 +1175,7 @@ and can edit it until it as been confirmed.")
   GCPRO1 (prompt);
   while (1)
     {
-      ans = Fdowncase (Fread_minibuffer (prompt, Qnil));
+      ans = Fdowncase (Fread_string (prompt, Qnil));
       if (XSTRING (ans)->size == 3 && !strcmp (XSTRING (ans)->data, "yes"))
        {
          UNGCPRO;
@@ -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;
 }