changeset 84426:74dfb3b7d8f2

(Fcall_interactively): Use Finteractive_form also for subrs and compiled functions.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 10 Sep 2007 02:29:42 +0000
parents de15045ac6fe
children ec0a616d2629
files src/ChangeLog src/callint.c
diffstat 2 files changed, 16 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Sep 10 01:20:44 2007 +0000
+++ b/src/ChangeLog	Mon Sep 10 02:29:42 2007 +0000
@@ -1,3 +1,8 @@
+2007-09-10  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* callint.c (Fcall_interactively): Use Finteractive_form also for subrs
+	and compiled functions.
+
 2007-09-08  Fredrik Axelsson  <f.axelsson@gmail.com>
 
 	* window.c (prefer_window_split_horizontally): New variable.
--- a/src/callint.c	Mon Sep 10 01:20:44 2007 +0000
+++ b/src/callint.c	Mon Sep 10 02:29:42 2007 +0000
@@ -332,32 +332,16 @@
   /* Decode the kind of function.  Either handle it and return,
      or go to `lose' if not interactive, or set either STRING or SPECS.  */
 
-  if (SUBRP (fun))
-    {
-      string = (unsigned char *) XSUBR (fun)->prompt;
-      if (!string)
-	{
-	lose:
-	  wrong_type_argument (Qcommandp, function);
-	}
-    }
-  else if (COMPILEDP (fun))
-    {
-      if ((XVECTOR (fun)->size & PSEUDOVECTOR_SIZE_MASK) <= COMPILED_INTERACTIVE)
-	goto lose;
-      specs = XVECTOR (fun)->contents[COMPILED_INTERACTIVE];
-    }
-  else
-    {
-      Lisp_Object form;
-      GCPRO2 (function, prefix_arg);
-      form = Finteractive_form (function);
-      UNGCPRO;
-      if (CONSP (form))
-	specs = filter_specs = Fcar (XCDR (form));
-      else
-	goto lose;
-    }
+  {
+    Lisp_Object form;
+    GCPRO2 (function, prefix_arg);
+    form = Finteractive_form (function);
+    UNGCPRO;
+    if (CONSP (form))
+      specs = filter_specs = Fcar (XCDR (form));
+    else
+      wrong_type_argument (Qcommandp, function);
+  }
 
   /* If either SPECS or STRING is set to a string, use it.  */
   if (STRINGP (specs))
@@ -368,7 +352,7 @@
       bcopy (SDATA (specs), string,
 	     SBYTES (specs) + 1);
     }
-  else if (string == 0)
+  else
     {
       Lisp_Object input;
       i = num_input_events;