]> code.delx.au - gnu-emacs/blobdiff - src/callint.c
(Fdocumentation, Fdocumentation_property, Fsubstitute_command_keys):
[gnu-emacs] / src / callint.c
index 94f64c635281031ffd1543bab5919e3038d1de8d..c0699b44fb8463076a270d27f619b8c5f8298656 100644 (file)
@@ -174,16 +174,13 @@ See `interactive'.\n\
 \n\
 Optional second arg RECORD-FLAG non-nil\n\
 means unconditionally put this command in the command-history.\n\
-Otherwise, this is done only if an arg is read using the minibuffer.\n\n\
-FUNCTION may be a list (FUNCTION ARGS...), which means to provide\n\
-the arguments ARGS before the ones read by FUNCTION's interactive spec.")
-  (function, record, keys)
-     Lisp_Object function, record, keys;
+Otherwise, this is done only if an arg is read using the minibuffer.")
+  (function, record_flag, keys)
+     Lisp_Object function, record_flag, keys;
 {
   Lisp_Object *args, *visargs;
   unsigned char **argstrings;
   Lisp_Object fun;
-  Lisp_Object given_args;
   Lisp_Object funcar;
   Lisp_Object specs;
   Lisp_Object teml;
@@ -222,16 +219,6 @@ the arguments ARGS before the ones read by FUNCTION's interactive spec.")
   /* Save this now, since use of minibuffer will clobber it. */
   prefix_arg = Vcurrent_prefix_arg;
 
-  /* Separate out any initial args specified by the caller.  */
-  if (CONSP (function) && ! EQ (XCONS (function)->car, Qlambda)
-      && ! EQ (XCONS (function)->car, Qautoload))
-    {
-      given_args = XCONS (function)->cdr;
-      function = XCONS (function)->car;
-    }
-  else
-    given_args = Qnil;
-
  retry:
 
   if (SYMBOLP (function))
@@ -303,8 +290,8 @@ the arguments ARGS before the ones read by FUNCTION's interactive spec.")
       i = num_input_chars;
       input = specs;
       /* Compute the arg values using the user's expression.  */
-      specs = nconc2 (Fcopy_sequence (given_args), Feval (specs));
-      if (i != num_input_chars || !NILP (record))
+      specs = Feval (specs);
+      if (i != num_input_chars || !NILP (record_flag))
        {
          /* We should record this command on the command history.  */
          Lisp_Object values, car;
@@ -416,8 +403,7 @@ the arguments ARGS before the ones read by FUNCTION's interactive spec.")
       else
        tem = (unsigned char *) "";
     }
-  /* Add in the number of args the caller specified.  */
-  count = j + XINT (Flength (given_args));
+  count = j;
 
   args = (Lisp_Object *) alloca ((count + 1) * sizeof (Lisp_Object));
   visargs = (Lisp_Object *) alloca ((count + 1) * sizeof (Lisp_Object));
@@ -431,16 +417,6 @@ the arguments ARGS before the ones read by FUNCTION's interactive spec.")
       varies[i] = 0;
     }
 
-  /* Put any args that the caller specified
-     into the vector.  */
-  i = 1;
-  while (!NILP (given_args))
-    {
-      visargs[i] = args[i] = XCONS (given_args)->car;
-      given_args = XCONS (given_args)->cdr;
-      i++;
-    }
-
   GCPRO4 (prefix_arg, function, *args, *visargs);
   gcpro3.nvars = (count + 1);
   gcpro4.nvars = (count + 1);
@@ -449,7 +425,7 @@ the arguments ARGS before the ones read by FUNCTION's interactive spec.")
     specbind (Qenable_recursive_minibuffers, Qt);
 
   tem = string;
-  for (; *tem; i++)
+  for (i = 1; *tem; i++)
     {
       strncpy (prompt1, tem + 1, sizeof prompt1 - 1);
       prompt1[sizeof prompt1 - 1] = 0;
@@ -666,7 +642,7 @@ the arguments ARGS before the ones read by FUNCTION's interactive spec.")
 
   args[0] = function;
 
-  if (arg_from_tty || !NILP (record))
+  if (arg_from_tty || !NILP (record_flag))
     {
       visargs[0] = function;
       for (i = 1; i < count + 1; i++)
@@ -700,7 +676,7 @@ the arguments ARGS before the ones read by FUNCTION's interactive spec.")
 
 DEFUN ("prefix-numeric-value", Fprefix_numeric_value, Sprefix_numeric_value,
   1, 1, 0,
-  "Return numeric meaning of raw prefix argument ARG.\n\
+  "Return numeric meaning of raw prefix argument RAW.\n\
 A raw prefix argument is what you get from `(interactive \"P\")'.\n\
 Its numeric meaning is what you would get from `(interactive \"p\")'.")
   (raw)