Mercurial > emacs
comparison src/callint.c @ 873:0abaf590e0ca
entered into RCS
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 26 Jul 1992 19:36:03 +0000 |
parents | 427299469901 |
children | a29670271217 |
comparison
equal
deleted
inserted
replaced
872:336ffe2bd537 | 873:0abaf590e0ca |
---|---|
31 Lisp_Object Vprefix_arg, Vcurrent_prefix_arg, Qminus; | 31 Lisp_Object Vprefix_arg, Vcurrent_prefix_arg, Qminus; |
32 Lisp_Object Qcall_interactively; | 32 Lisp_Object Qcall_interactively; |
33 Lisp_Object Vcommand_history; | 33 Lisp_Object Vcommand_history; |
34 | 34 |
35 Lisp_Object Vcommand_debug_status, Qcommand_debug_status; | 35 Lisp_Object Vcommand_debug_status, Qcommand_debug_status; |
36 Lisp_Object Qenable_recursive_minibuffers; | |
36 | 37 |
37 /* This comment supplies the doc string for interactive, | 38 /* This comment supplies the doc string for interactive, |
38 for make-docfile to see. We cannot put this in the real DEFUN | 39 for make-docfile to see. We cannot put this in the real DEFUN |
39 due to limits in the Unix cpp. | 40 due to limits in the Unix cpp. |
40 | 41 |
154 unsigned char **argstrings; | 155 unsigned char **argstrings; |
155 Lisp_Object fun; | 156 Lisp_Object fun; |
156 Lisp_Object funcar; | 157 Lisp_Object funcar; |
157 Lisp_Object specs; | 158 Lisp_Object specs; |
158 Lisp_Object teml; | 159 Lisp_Object teml; |
160 Lisp_Object enable; | |
161 int speccount = specpdl_ptr - specpdl; | |
159 | 162 |
160 Lisp_Object prefix_arg; | 163 Lisp_Object prefix_arg; |
161 unsigned char *string; | 164 unsigned char *string; |
162 unsigned char *tem; | 165 unsigned char *tem; |
163 | 166 |
176 | 179 |
177 /* Save this now, since use of minibuffer will clobber it. */ | 180 /* Save this now, since use of minibuffer will clobber it. */ |
178 prefix_arg = Vcurrent_prefix_arg; | 181 prefix_arg = Vcurrent_prefix_arg; |
179 | 182 |
180 retry: | 183 retry: |
184 | |
185 enable = Fget (function, Qenable_recursive_minibuffers); | |
181 | 186 |
182 fun = indirect_function (function); | 187 fun = indirect_function (function); |
183 | 188 |
184 specs = Qnil; | 189 specs = Qnil; |
185 string = 0; | 190 string = 0; |
297 | 302 |
298 GCPRO4 (prefix_arg, function, *args, *visargs); | 303 GCPRO4 (prefix_arg, function, *args, *visargs); |
299 gcpro3.nvars = (count + 1); | 304 gcpro3.nvars = (count + 1); |
300 gcpro4.nvars = (count + 1); | 305 gcpro4.nvars = (count + 1); |
301 | 306 |
307 if (!NILP (enable)) | |
308 specbind (Qenable_recursive_minibuffers, Qt); | |
309 | |
302 tem = string; | 310 tem = string; |
303 for (i = 1; *tem; i++) | 311 for (i = 1; *tem; i++) |
304 { | 312 { |
305 strncpy (prompt1, tem + 1, sizeof prompt1 - 1); | 313 strncpy (prompt1, tem + 1, sizeof prompt1 - 1); |
306 prompt1[sizeof prompt1 - 1] = 0; | 314 prompt1[sizeof prompt1 - 1] = 0; |
472 | 480 |
473 tem = (unsigned char *) index (tem, '\n'); | 481 tem = (unsigned char *) index (tem, '\n'); |
474 if (tem) tem++; | 482 if (tem) tem++; |
475 else tem = (unsigned char *) ""; | 483 else tem = (unsigned char *) ""; |
476 } | 484 } |
485 unbind_to (speccount, Qnil); | |
477 | 486 |
478 QUIT; | 487 QUIT; |
479 | 488 |
480 args[0] = function; | 489 args[0] = function; |
481 | 490 |
491 Vcommand_history); | 500 Vcommand_history); |
492 } | 501 } |
493 | 502 |
494 { | 503 { |
495 Lisp_Object val; | 504 Lisp_Object val; |
496 int speccount = specpdl_ptr - specpdl; | |
497 specbind (Qcommand_debug_status, Qnil); | 505 specbind (Qcommand_debug_status, Qnil); |
498 | 506 |
499 val = Ffuncall (count + 1, args); | 507 val = Ffuncall (count + 1, args); |
500 UNGCPRO; | 508 UNGCPRO; |
501 return unbind_to (speccount, val); | 509 return unbind_to (speccount, val); |
538 Qcall_interactively = intern ("call-interactively"); | 546 Qcall_interactively = intern ("call-interactively"); |
539 staticpro (&Qcall_interactively); | 547 staticpro (&Qcall_interactively); |
540 | 548 |
541 Qcommand_debug_status = intern ("command-debug-status"); | 549 Qcommand_debug_status = intern ("command-debug-status"); |
542 staticpro (&Qcommand_debug_status); | 550 staticpro (&Qcommand_debug_status); |
551 | |
552 Qenable_recursive_minibuffers = intern ("enable-recursive-minibuffers"); | |
553 staticpro (&Qenable_recursive_minibuffers); | |
543 | 554 |
544 DEFVAR_LISP ("prefix-arg", &Vprefix_arg, | 555 DEFVAR_LISP ("prefix-arg", &Vprefix_arg, |
545 "The value of the prefix argument for the next editing command.\n\ | 556 "The value of the prefix argument for the next editing command.\n\ |
546 It may be a number, or the symbol `-' for just a minus sign as arg,\n\ | 557 It may be a number, or the symbol `-' for just a minus sign as arg,\n\ |
547 or a list whose car is a number for just one or more C-U's\n\ | 558 or a list whose car is a number for just one or more C-U's\n\ |