aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1995-12-25 00:33:14 +0000
committerRichard M. Stallman1995-12-25 00:33:14 +0000
commit6bc1abf2e03f91fea1a86cb3482d4544c24639a2 (patch)
tree4e48c9f3c893c2be3a930357d9b70856bd6e7186 /src
parent01e262176a831029e2db1493efa2f3fa30631d1a (diff)
downloademacs-6bc1abf2e03f91fea1a86cb3482d4544c24639a2.tar.gz
emacs-6bc1abf2e03f91fea1a86cb3482d4544c24639a2.zip
(Fcall_interactively): Undo previous change.
Diffstat (limited to 'src')
-rw-r--r--src/callint.c32
1 files changed, 4 insertions, 28 deletions
diff --git a/src/callint.c b/src/callint.c
index 94f64c63528..a509dc4f328 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -174,16 +174,13 @@ See `interactive'.\n\
174\n\ 174\n\
175Optional second arg RECORD-FLAG non-nil\n\ 175Optional second arg RECORD-FLAG non-nil\n\
176means unconditionally put this command in the command-history.\n\ 176means unconditionally put this command in the command-history.\n\
177Otherwise, this is done only if an arg is read using the minibuffer.\n\n\ 177Otherwise, this is done only if an arg is read using the minibuffer.")
178FUNCTION may be a list (FUNCTION ARGS...), which means to provide\n\
179the arguments ARGS before the ones read by FUNCTION's interactive spec.")
180 (function, record, keys) 178 (function, record, keys)
181 Lisp_Object function, record, keys; 179 Lisp_Object function, record, keys;
182{ 180{
183 Lisp_Object *args, *visargs; 181 Lisp_Object *args, *visargs;
184 unsigned char **argstrings; 182 unsigned char **argstrings;
185 Lisp_Object fun; 183 Lisp_Object fun;
186 Lisp_Object given_args;
187 Lisp_Object funcar; 184 Lisp_Object funcar;
188 Lisp_Object specs; 185 Lisp_Object specs;
189 Lisp_Object teml; 186 Lisp_Object teml;
@@ -222,16 +219,6 @@ the arguments ARGS before the ones read by FUNCTION's interactive spec.")
222 /* Save this now, since use of minibuffer will clobber it. */ 219 /* Save this now, since use of minibuffer will clobber it. */
223 prefix_arg = Vcurrent_prefix_arg; 220 prefix_arg = Vcurrent_prefix_arg;
224 221
225 /* Separate out any initial args specified by the caller. */
226 if (CONSP (function) && ! EQ (XCONS (function)->car, Qlambda)
227 && ! EQ (XCONS (function)->car, Qautoload))
228 {
229 given_args = XCONS (function)->cdr;
230 function = XCONS (function)->car;
231 }
232 else
233 given_args = Qnil;
234
235 retry: 222 retry:
236 223
237 if (SYMBOLP (function)) 224 if (SYMBOLP (function))
@@ -303,7 +290,7 @@ the arguments ARGS before the ones read by FUNCTION's interactive spec.")
303 i = num_input_chars; 290 i = num_input_chars;
304 input = specs; 291 input = specs;
305 /* Compute the arg values using the user's expression. */ 292 /* Compute the arg values using the user's expression. */
306 specs = nconc2 (Fcopy_sequence (given_args), Feval (specs)); 293 specs = Feval (specs);
307 if (i != num_input_chars || !NILP (record)) 294 if (i != num_input_chars || !NILP (record))
308 { 295 {
309 /* We should record this command on the command history. */ 296 /* 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 else 403 else
417 tem = (unsigned char *) ""; 404 tem = (unsigned char *) "";
418 } 405 }
419 /* Add in the number of args the caller specified. */ 406 count = j;
420 count = j + XINT (Flength (given_args));
421 407
422 args = (Lisp_Object *) alloca ((count + 1) * sizeof (Lisp_Object)); 408 args = (Lisp_Object *) alloca ((count + 1) * sizeof (Lisp_Object));
423 visargs = (Lisp_Object *) alloca ((count + 1) * sizeof (Lisp_Object)); 409 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 varies[i] = 0; 417 varies[i] = 0;
432 } 418 }
433 419
434 /* Put any args that the caller specified
435 into the vector. */
436 i = 1;
437 while (!NILP (given_args))
438 {
439 visargs[i] = args[i] = XCONS (given_args)->car;
440 given_args = XCONS (given_args)->cdr;
441 i++;
442 }
443
444 GCPRO4 (prefix_arg, function, *args, *visargs); 420 GCPRO4 (prefix_arg, function, *args, *visargs);
445 gcpro3.nvars = (count + 1); 421 gcpro3.nvars = (count + 1);
446 gcpro4.nvars = (count + 1); 422 gcpro4.nvars = (count + 1);
@@ -449,7 +425,7 @@ the arguments ARGS before the ones read by FUNCTION's interactive spec.")
449 specbind (Qenable_recursive_minibuffers, Qt); 425 specbind (Qenable_recursive_minibuffers, Qt);
450 426
451 tem = string; 427 tem = string;
452 for (; *tem; i++) 428 for (i = 1; *tem; i++)
453 { 429 {
454 strncpy (prompt1, tem + 1, sizeof prompt1 - 1); 430 strncpy (prompt1, tem + 1, sizeof prompt1 - 1);
455 prompt1[sizeof prompt1 - 1] = 0; 431 prompt1[sizeof prompt1 - 1] = 0;