Commit 6bc1abf2 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(Fcall_interactively): Undo previous change.

parent 01e26217
...@@ -174,16 +174,13 @@ See `interactive'.\n\ ...@@ -174,16 +174,13 @@ See `interactive'.\n\
\n\ \n\
Optional second arg RECORD-FLAG non-nil\n\ Optional second arg RECORD-FLAG non-nil\n\
means unconditionally put this command in the command-history.\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\ Otherwise, this is done only if an arg is read using the minibuffer.")
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) (function, record, keys)
Lisp_Object function, record, keys; Lisp_Object function, record, keys;
{ {
Lisp_Object *args, *visargs; Lisp_Object *args, *visargs;
unsigned char **argstrings; unsigned char **argstrings;
Lisp_Object fun; Lisp_Object fun;
Lisp_Object given_args;
Lisp_Object funcar; Lisp_Object funcar;
Lisp_Object specs; Lisp_Object specs;
Lisp_Object teml; Lisp_Object teml;
...@@ -222,16 +219,6 @@ the arguments ARGS before the ones read by FUNCTION's interactive spec.") ...@@ -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. */ /* Save this now, since use of minibuffer will clobber it. */
prefix_arg = Vcurrent_prefix_arg; 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: retry:
if (SYMBOLP (function)) if (SYMBOLP (function))
...@@ -303,7 +290,7 @@ the arguments ARGS before the ones read by FUNCTION's interactive spec.") ...@@ -303,7 +290,7 @@ the arguments ARGS before the ones read by FUNCTION's interactive spec.")
i = num_input_chars; i = num_input_chars;
input = specs; input = specs;
/* Compute the arg values using the user's expression. */ /* Compute the arg values using the user's expression. */
specs = nconc2 (Fcopy_sequence (given_args), Feval (specs)); specs = Feval (specs);
if (i != num_input_chars || !NILP (record)) if (i != num_input_chars || !NILP (record))
{ {
/* We should record this command on the command history. */ /* We should record this command on the command history. */
...@@ -416,8 +403,7 @@ the arguments ARGS before the ones read by FUNCTION's interactive spec.") ...@@ -416,8 +403,7 @@ the arguments ARGS before the ones read by FUNCTION's interactive spec.")
else else
tem = (unsigned char *) ""; tem = (unsigned char *) "";
} }
/* Add in the number of args the caller specified. */ count = j;
count = j + XINT (Flength (given_args));
args = (Lisp_Object *) alloca ((count + 1) * sizeof (Lisp_Object)); args = (Lisp_Object *) alloca ((count + 1) * sizeof (Lisp_Object));
visargs = (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.") ...@@ -431,16 +417,6 @@ the arguments ARGS before the ones read by FUNCTION's interactive spec.")
varies[i] = 0; 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); GCPRO4 (prefix_arg, function, *args, *visargs);
gcpro3.nvars = (count + 1); gcpro3.nvars = (count + 1);
gcpro4.nvars = (count + 1); gcpro4.nvars = (count + 1);
...@@ -449,7 +425,7 @@ the arguments ARGS before the ones read by FUNCTION's interactive spec.") ...@@ -449,7 +425,7 @@ the arguments ARGS before the ones read by FUNCTION's interactive spec.")
specbind (Qenable_recursive_minibuffers, Qt); specbind (Qenable_recursive_minibuffers, Qt);
tem = string; tem = string;
for (; *tem; i++) for (i = 1; *tem; i++)
{ {
strncpy (prompt1, tem + 1, sizeof prompt1 - 1); strncpy (prompt1, tem + 1, sizeof prompt1 - 1);
prompt1[sizeof prompt1 - 1] = 0; prompt1[sizeof prompt1 - 1] = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment