]> code.delx.au - gnu-emacs/blobdiff - src/callint.c
*** empty log message ***
[gnu-emacs] / src / callint.c
index 3b0d315db93d95a1704290f5b580786508882125..8b8cb0320959eac94dc27202a5c17de5e850fa94 100644 (file)
@@ -1,5 +1,5 @@
 /* Call a Lisp function interactively.
-   Copyright (C) 1985, 86, 93, 94, 95, 1997, 2000, 02, 2003
+   Copyright (C) 1985, 86, 93, 94, 95, 1997, 2000, 02, 03, 2004
    Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -209,7 +209,7 @@ fix_command (input, values)
          Lisp_Object intail, valtail;
          for (intail = Fcdr (input), valtail = values;
               CONSP (valtail);
-              intail = Fcdr (intail), valtail = Fcdr (valtail))
+              intail = Fcdr (intail), valtail = XCDR (valtail))
            {
              Lisp_Object elt;
              elt = Fcar (intail);
@@ -256,7 +256,8 @@ Optional second arg RECORD-FLAG non-nil
 means unconditionally put this command in the command-history.
 Otherwise, this is done only if an arg is read using the minibuffer.
 Optional third arg KEYS, if given, specifies the sequence of events to
-supply if the command inquires which events were used to invoke it.  */)
+supply if the command inquires which events were used to invoke it.
+If KEYS is omitted or nil, the return value of `this-command-keys' is used.  */)
      (function, record_flag, keys)
      Lisp_Object function, record_flag, keys;
 {
@@ -347,25 +348,17 @@ supply if the command inquires which events were used to invoke it.  */)
        goto lose;
       specs = XVECTOR (fun)->contents[COMPILED_INTERACTIVE];
     }
-  else if (!CONSP (fun))
-    goto lose;
-  else if (funcar = XCAR (fun), EQ (funcar, Qautoload))
+  else
     {
+      Lisp_Object form;
       GCPRO2 (function, prefix_arg);
-      do_autoload (fun, function);
+      form = Finteractive_form (function);
       UNGCPRO;
-      goto retry;
-    }
-  else if (EQ (funcar, Qlambda))
-    {
-      specs = Fassq (Qinteractive, Fcdr (XCDR (fun)));
-      if (NILP (specs))
+      if (CONSP (form))
+       specs = filter_specs = Fcar (XCDR (form));
+      else
        goto lose;
-      filter_specs = Fnth (make_number (1), specs);
-      specs = Fcar (Fcdr (specs));
     }
-  else
-    goto lose;
 
   /* If either SPECS or STRING is set to a string, use it.  */
   if (STRINGP (specs))
@@ -620,7 +613,7 @@ supply if the command inquires which events were used to invoke it.  */)
                                          Qnil, Qnil, Qnil, Qnil);
            unbind_to (speccount1, Qnil);
            teml = args[i];
-           visargs[i] = Fkey_description (teml);
+           visargs[i] = Fkey_description (teml, Qnil);
 
            /* If the key sequence ends with a down-event,
               discard the following up-event.  */
@@ -647,7 +640,7 @@ supply if the command inquires which events were used to invoke it.  */)
            args[i] = Fread_key_sequence (build_string (callint_message),
                                          Qnil, Qt, Qnil, Qnil);
            teml = args[i];
-           visargs[i] = Fkey_description (teml);
+           visargs[i] = Fkey_description (teml, Qnil);
            unbind_to (speccount1, Qnil);
 
            /* If the key sequence ends with a down-event,
@@ -998,3 +991,6 @@ a way to turn themselves off when a mouse command switches windows.  */);
   defsubr (&Scall_interactively);
   defsubr (&Sprefix_numeric_value);
 }
+
+/* arch-tag: a3a7cad7-bcac-42ce-916e-1bd2546ebf37
+   (do not change this comment) */