1 /* Call a Lisp function interactively.
2 Copyright (C) 1985, 1986, 1992, 1993, 1994 Free Software Foundation, Inc.
3 Copyright (C) 1995, 1996 Ben Wing.
5 This file is part of SXEmacs
7 SXEmacs is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 SXEmacs is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21 /* Synched up with: FSF 19.30, Mule 2.0. */
26 Mly or JWZ: various changes.
36 #define INCLUDE_EVENTS_H_PRIVATE_SPHERE
37 #include "events/events.h"
38 #include "ui/insdel.h"
39 #include "ui/window.h"
41 extern Charcount num_input_chars;
43 Lisp_Object Vcurrent_prefix_arg;
44 Lisp_Object Qcall_interactively;
45 Lisp_Object Vcommand_history;
47 Lisp_Object Vcommand_debug_status, Qcommand_debug_status;
48 Lisp_Object Qenable_recursive_minibuffers;
51 /* Non-nil means treat the mark as active
52 even if mark_active is 0. */
53 Lisp_Object Vmark_even_if_inactive;
56 #if 0 /* ill-conceived */
57 /* FSF calls Qmouse_leave_buffer_hook at all sorts of random places,
58 including a bunch of places in their mouse.el. If this is
59 implemented, it has to be done cleanly. */
60 Lisp_Object Vmouse_leave_buffer_hook, Qmouse_leave_buffer_hook;
63 Lisp_Object QletX, Qsave_excursion;
65 Lisp_Object Qread_from_minibuffer;
66 Lisp_Object Qread_file_name;
67 Lisp_Object Qread_directory_name;
68 Lisp_Object Qcompleting_read;
69 Lisp_Object Qread_buffer;
70 Lisp_Object Qread_function;
71 Lisp_Object Qread_variable;
72 Lisp_Object Qread_expression;
73 Lisp_Object Qread_command;
74 Lisp_Object Qread_number;
75 Lisp_Object Qread_string;
76 Lisp_Object Qevents_to_keys;
78 #if defined(MULE) || defined(FILE_CODING)
79 Lisp_Object Qread_coding_system;
80 Lisp_Object Qread_non_nil_coding_system;
84 DEFUN("interactive", Finteractive, 0, UNEVALLED, 0, /*
85 Specify a way of parsing arguments for interactive use of a function.
87 (defun foo (arg) "Doc string" (interactive "p") ...use arg...)
88 to make ARG be the prefix argument when `foo' is called as a command.
89 The "call" to `interactive' is actually a declaration rather than a function;
90 it tells `call-interactively' how to read arguments
91 to pass to the function.
92 When actually called, `interactive' just returns nil.
94 The argument of `interactive' is usually a string containing a code letter
95 followed by a prompt. (Some code letters do not use I/O to get
96 the argument and do not need prompts.) To prompt for multiple arguments,
97 give a code letter, its prompt, a newline, and another code letter, etc.
98 Prompts are passed to format, and may use % escapes to print the
99 arguments that have already been read.
100 If the argument is not a string, it is evaluated to get a list of
101 arguments to pass to the function.
102 Just `(interactive)' means pass no args when calling interactively.
104 Code letters available are:
105 a -- Function name: symbol with a function definition.
106 b -- Name of existing buffer.
107 B -- Name of buffer, possibly nonexistent.
109 C -- Command name: symbol with interactive function definition.
110 d -- Value of point as number. Does not do I/O.
112 e -- Last mouse-button or misc-user event that invoked this command.
113 If used more than once, the Nth `e' returns the Nth such event.
115 f -- Existing file name.
116 F -- Possibly nonexistent file name.
117 i -- Always nil, ignore. Use to skip arguments when interactive.
118 k -- Key sequence (a vector of events).
119 K -- Key sequence to be redefined (do not automatically down-case).
120 m -- Value of mark as number. Does not do I/O.
121 n -- Number read using minibuffer.
122 N -- Prefix arg converted to number, or if none, do like code `n'.
123 p -- Prefix arg converted to number. Does not do I/O.
124 P -- Prefix arg in raw form. Does not do I/O.
125 r -- Region: point and mark as 2 numeric args, smallest first. Does no I/O.
128 v -- Variable name: symbol that is user-variable-p.
129 x -- Lisp expression read but not evaluated.
130 X -- Lisp expression read and evaluated.
131 z -- Coding system. (Always nil if no Mule support.)
132 Z -- Coding system, nil if no prefix arg. (Always nil if no Mule support.)
133 In addition, if the string begins with `*'
134 then an error is signaled if the buffer is read-only.
135 This happens before reading any arguments.
136 If the string begins with `@', then the window the mouse is over is selected
137 before anything else is done.
138 If the string begins with `_', then this command will not cause the region
139 to be deactivated when it completes; that is, `zmacs-region-stays' will be
140 set to t when the command exits successfully.
141 You may use any of `@', `*' and `_' at the beginning of the string;
142 they are processed in the order that they appear.
149 /* Originally, this was just a function -- but `custom' used a
150 garden-variety version, so why not make it a subr? */
151 /* #### Move it to another file! */
152 DEFUN("quote-maybe", Fquote_maybe, 1, 1, 0, /*
153 Quote EXPR if it is not self quoting.
166 || (CONSP(expr) && EQ(XCAR(expr), Qlambda)))
167 ? expr : list2(Qquote, expr));
170 /* Modify EXPR by quotifying each element (except the first). */
171 static Lisp_Object quotify_args(Lisp_Object expr)
175 for (tail = expr; CONSP(tail); tail = ptr->cdr) {
177 ptr->car = Fquote_maybe(ptr->car);
182 static Bufpos check_mark(void)
186 if (zmacs_regions && !zmacs_region_active_p)
187 error("The region is not active now");
189 tem = Fmarker_buffer(current_buffer->mark);
190 if (NILP(tem) || (XBUFFER(tem) != current_buffer))
191 error("The mark is not set now");
193 return marker_position(current_buffer->mark);
197 callint_prompt(const Bufbyte * prompt_start, Bytecount prompt_length,
198 const Lisp_Object *args, int nargs)
200 Lisp_Object s = make_string(prompt_start, prompt_length);
203 /* Fformat no longer smashes its arg vector, so no need to copy it. */
205 if (!strchr((char*)XSTRING_DATA(s), '%')) {
209 RETURN_UNGCPRO(emacs_doprnt_string_lisp(0, s, 0, nargs, args));
212 /* `lambda' for RECORD-FLAG is an XEmacs addition. */
214 DEFUN("call-interactively", Fcall_interactively, 1, 3, 0, /*
215 Call FUNCTION, reading args according to its interactive calling specs.
216 Return the value FUNCTION returns.
217 The function contains a specification of how to do the argument reading.
218 In the case of user-defined functions, this is specified by placing a call
219 to the function `interactive' at the top level of the function body.
222 If optional second arg RECORD-FLAG is the symbol `lambda', the interactive
223 calling arguments for FUNCTION are read and returned as a list,
224 but the function is not called on them.
226 If RECORD-FLAG is `t' then unconditionally put this command in the
227 command-history. Otherwise, this is done only if an arg is read using
230 The argument KEYS specifies the value to use instead of (this-command-keys)
231 when reading the arguments.
233 (function, record_flag, keys))
235 /* This function can GC */
236 int speccount = specpdl_depth();
240 Lisp_Object specs = Qnil;
241 #ifdef IT_SEEMS_THAT_MLY_DOESNT_LIKE_THIS
244 /* If SPECS is a string, we reset prompt_data to string_data
245 * (XSTRING (specs)) every time a GC might have occurred */
246 const char *prompt_data = 0;
247 int prompt_index = 0;
249 int set_zmacs_region_stays = 0;
250 int mouse_event_count = 0;
256 len = XVECTOR_LENGTH(keys);
257 for (i = 0; i < len; i++)
258 CHECK_LIVE_EVENT(XVECTOR_DATA(keys)[i]);
261 /* Save this now, since use of minibuffer will clobber it. */
262 prefix = Vcurrent_prefix_arg;
266 #ifdef IT_SEEMS_THAT_MLY_DOESNT_LIKE_THIS
267 /* Marginal kludge. Use an evaluated interactive spec instead of this! */
268 if (SYMBOLP(function))
269 enable = Fget(function, Qenable_recursive_minibuffers, Qnil);
272 fun = indirect_function(function, 1);
274 /* Decode the kind of function. Either handle it and return,
275 or go to `lose' if not interactive, or go to `retry'
276 to specify a different function, or set either PROMPT_DATA or SPECS. */
279 prompt_data = XSUBR(fun)->prompt;
282 function = wrong_type_argument(Qcommandp, function);
285 #if 0 /* FSFmacs */ /* Huh? Where is this used? */
286 if ((EMACS_INT) prompt_data == 1)
287 /* Let SPECS (which is nil) be used as the args. */
290 } else if (COMPILED_FUNCTIONP(fun)) {
291 Lisp_Compiled_Function *f = XCOMPILED_FUNCTION(fun);
292 if (!f->flags.interactivep)
294 specs = compiled_function_interactive(f);
295 } else if (!CONSP(fun))
298 Lisp_Object funcar = Fcar(fun);
300 if (EQ(funcar, Qautoload)) {
303 /* do_autoload GCPROs both arguments */
304 do_autoload(fun, function);
307 } else if (EQ(funcar, Qlambda)) {
308 specs = Fassq(Qinteractive, Fcdr(Fcdr(fun)));
311 specs = Fcar(Fcdr(specs));
316 /* FSFmacs makes an alloca() copy of prompt_data here.
317 We're more intelligent about this and just reset prompt_data
319 /* If either specs or prompt_data is set to a string, use it. */
320 if (!STRINGP(specs) && prompt_data == 0) {
321 struct gcpro gcpro1, gcpro2, gcpro3;
322 int i = num_input_chars;
323 Lisp_Object input = specs;
325 GCPRO3(function, specs, input);
326 /* Compute the arg values using the user's expression. */
327 specs = Feval(specs);
328 if (EQ(record_flag, Qlambda)) { /* XEmacs addition */
332 if (!NILP(record_flag) || i != num_input_chars) {
333 /* We should record this command on the command history. */
334 /* #### The following is too specific; should have general
335 mechanism for doing this. */
336 Lisp_Object values, car;
337 /* Make a copy of the list of values, for the command history,
338 and turn them into things we can eval. */
339 values = quotify_args(Fcopy_sequence(specs));
340 /* If the list of args was produced with an explicit call to `list',
341 look for elements that were computed with (region-beginning)
342 or (region-end), and put those expressions into VALUES
343 instead of the present values. */
346 /* Skip through certain special forms. */
347 while (EQ(car, Qlet) || EQ(car, QletX)
348 || EQ(car, Qsave_excursion)) {
349 while (CONSP(XCDR(input)))
356 if (EQ(car, Qlist)) {
357 Lisp_Object intail, valtail;
358 for (intail = Fcdr(input), valtail =
359 values; CONSP(valtail);
360 intail = Fcdr(intail), valtail =
367 if (EQ(eltcar, Qpoint)
381 = Fcons(Fcons(function, values), Vcommand_history);
383 single_console_state();
384 RETURN_UNGCPRO(apply1(fun, specs));
387 /* Here if function specifies a string to control parsing the defaults */
390 /* Translate interactive prompt. */
391 if (STRINGP(specs)) {
392 Lisp_Object domain = Qnil;
393 if (COMPILED_FUNCTIONP(fun))
395 compiled_function_domain(XCOMPILED_FUNCTION(fun));
397 specs = Fgettext(specs);
399 specs = Fdgettext(domain, specs);
400 } else if (prompt_data)
401 /* We do not have to worry about domains in this case because
402 prompt_data is non-nil only for built-in functions, which
403 always use the default domain. */
404 prompt_data = gettext(prompt_data);
407 /* Handle special starting chars `*' and `@' and `_'. */
408 /* Note that `+' is reserved for user extensions. */
411 struct gcpro gcpro1, gcpro2;
412 GCPRO2(function, specs);
416 prompt_data = (char *)XSTRING_DATA(specs);
418 if (prompt_data[prompt_index] == '+')
420 ("`+' is not used in `interactive' for ordinary commands");
421 else if (prompt_data[prompt_index] == '*') {
423 if (!NILP(current_buffer->read_only))
424 barf_if_buffer_read_only(current_buffer,
426 } else if (prompt_data[prompt_index] == '@') {
432 extract_vector_nth_mouse_event(keys,
437 extract_this_command_keys_nth_mouse_event
440 /* Doesn't work; see below */
441 event = Vcurrent_mouse_event;
445 Fevent_window(event);
449 && !(minibuf_level > 0
453 ("Attempt to select inactive minibuffer window");
455 #if 0 /* unclean! see event-stream.c */
456 /* If the current buffer wants to clean up, let it. */
458 (Vmouse_leave_buffer_hook))
460 (Qmouse_leave_buffer_hook);
463 Fselect_window(window, Qnil);
466 } else if (prompt_data[prompt_index] == '_') {
468 set_zmacs_region_stays = 1;
476 /* Count the number of arguments the interactive spec would have
477 us give to the function. */
481 for (tem = prompt_data + prompt_index; *tem;) {
482 /* 'r' specifications ("point and mark as 2 numeric args")
483 produce *two* arguments. */
488 tem = (const char *)strchr(tem + 1, '\n');
495 #ifdef IT_SEEMS_THAT_MLY_DOESNT_LIKE_THIS
497 specbind(Qenable_recursive_minibuffers, Qt);
501 /* Interactive function or no arguments; just call it */
502 if (EQ(record_flag, Qlambda))
504 if (!NILP(record_flag)) {
506 Fcons(list1(function), Vcommand_history);
508 specbind(Qcommand_debug_status, Qnil);
509 /* XEmacs: was fun = call0 (fun), but that's backtraced wrong */
514 fun = Ffuncall(1, &fun);
517 if (set_zmacs_region_stays)
518 zmacs_region_stays = 1;
519 return unbind_to(speccount, fun);
522 /* Read interactive arguments */
524 /* args[-1] is the function to call */
525 /* args[n] is the n'th argument to the function */
526 int alloca_size = (1 /* function to call */
527 + argcount /* actual arguments */
528 + argcount /* visargs */
529 + argcount /* varies */
531 Lisp_Object *fcall= alloca_array(Lisp_Object, alloca_size);
532 Lisp_Object *args = fcall+1;
533 /* visargs is an array of either Qnil or user-friendlier
535 * strings) of previous arguments, to use in prompts for
537 * arguments. ("Often strings" because emacs didn't used to
539 * format %S and prin1-to-string.) */
540 Lisp_Object *visargs = args + argcount;
541 /* If varies[i] is non-null, the i'th argument shouldn't just
542 have its value in this call quoted in the command history.
543 It should be recorded as a call to the function named
545 Lisp_Object *varies = visargs + argcount;
546 int arg_from_tty = 0;
548 struct gcpro gcpro1, gcpro2;
551 for (argnum = 0; argnum < alloca_size - 1; argnum++)
554 /* Must GC-protect args[-1] (ie function) because Ffuncall
556 /* `function' itself isn't GC-protected -- use args[-1] from
557 here (actually, doesn't matter since Emacs GC doesn't
559 GCPRO1n(prefix, &args[-1], alloca_size);
561 for (argnum = 0;; argnum++) {
562 const char *prompt_start =
563 prompt_data + prompt_index + 1;
565 (char *)strchr(prompt_start, '\n');
567 prompt_length = ((prompt_limit)
568 ? (prompt_limit - prompt_start)
569 : (int)strlen(prompt_start));
570 if (prompt_limit && prompt_limit[1] == 0) {
571 /* "sfoo:\n" -- strip tailing return */
575 /* This uses `visargs' instead of `args' so that
576 global-set-key prompts with "Set key C-x C-f to
577 command: "instead of printing event objects in there.
579 #define PROMPT() callint_prompt ((const Bufbyte *) prompt_start, \
580 prompt_length, visargs, argnum)
581 switch (prompt_data[prompt_index]) {
583 /* Symbol defined as a function */
584 Lisp_Object tem = call1(
585 Qread_function, PROMPT());
591 /* Name of existing buffer */
592 Lisp_Object def = Fcurrent_buffer();
593 if (EQ(Fselected_window(Qnil),
595 def = Fother_buffer(def, Qnil, Qnil);
596 /* read-buffer returns a buffer name, not a
598 args[argnum] = call3(
599 Qread_buffer, PROMPT(), def, Qt);
604 /* Name of buffer, possibly nonexistent */
605 /* read-buffer returns a buffer name, not a
607 args[argnum] = call2(Qread_buffer, PROMPT(),
617 int shadowing_speccount =
620 specbind(Qcursor_in_echo_area, Qt);
622 Lisp_Object tmp = PROMPT();
623 message("%s", XSTRING_DATA(tmp));
625 tem = (call0(Qread_char));
627 /* visargs[argnum] = Fsingle_key_description
629 /* FSF has visargs[argnum] = Fchar_to_string
632 unbind_to(shadowing_speccount, Qnil);
634 /* #### `C-x / a' should not leave the prompt in
636 This isn't the right fix, because (message
637 ...) (read-char) shouldn't leave the message
645 /* Command: symbol with interactive function */
647 call1(Qread_command, PROMPT());
653 /* Value of point. Does not do I/O. */
654 args[argnum] = Fcopy_marker(current_buffer->
656 varies[argnum] = Qpoint;
665 extract_vector_nth_mouse_event
666 (keys, mouse_event_count);
669 /* This doesn't quite work because this-command-keys
670 behaves in utterly counterintuitive ways. Sometimes
671 it retrieves an event back in the future, e.g. when
672 one command invokes another command and both are
673 invoked with the mouse. */
675 (extract_this_command_keys_nth_mouse_event
676 (mouse_event_count));
678 event = Vcurrent_mouse_event;
683 ("%s must be bound to a mouse or misc-user event",
690 args[argnum] = event;
694 case 'D': /* Directory name. */
696 args[argnum] = call4(Qread_directory_name, PROMPT(), Qnil, /* dir */
697 current_buffer->directory, /* default */
703 case 'f': /* Existing file name. */
706 call4(Qread_file_name, PROMPT(),
709 Qzero /* must-match */
715 case 'F': /* Possibly nonexistent file name. */
717 args[argnum] = call4(Qread_file_name, PROMPT(), Qnil, /* dir */
719 Qnil /* must-match */
724 case 'i': /* Ignore: always nil. Use to skip arguments. */
729 case 'k': /* Key sequence (vector of events) */
731 struct gcpro ngcpro1;
733 Lisp_Object key_prompt = PROMPT();
737 Fread_key_sequence(key_prompt, Qnil,
741 visargs[argnum] = Fkey_description(tem);
742 /* The following makes `describe-key' not work with
743 extent-local keymaps and such; and anyway, it's
744 contrary to the documentation. */
745 /* args[argnum] = call1 (Qevents_to_keys, tem); */
750 case 'K': /* Key sequence (vector of events),
751 no automatic downcasing */
753 struct gcpro ngcpro1;
755 Lisp_Object key_prompt = PROMPT();
759 Fread_key_sequence(key_prompt, Qnil,
763 visargs[argnum] = Fkey_description(tem);
764 /* The following makes `describe-key' not work with
765 extent-local keymaps and such; and anyway, it's
766 contrary to the documentation. */
767 /* args[argnum] = call1 (Qevents_to_keys, tem); */
773 case 'm': /* Value of mark. Does not do I/O. */
775 args[argnum] = current_buffer->mark;
776 varies[argnum] = Qmark;
779 case 'n': /* Read number from minibuffer. */
783 call2(Qread_number, PROMPT(), Qnil);
784 /* numbers are too boring to go on command history */
785 /* arg_from_tty = 1; */
788 case 'N': /* Prefix arg, else number from minibuffer */
795 case 'P': /* Prefix arg in raw form. Does no I/O. */
797 args[argnum] = prefix;
800 case 'p': /* Prefix arg converted to number. No I/O. */
805 Fprefix_numeric_value
811 case 'r': /* Region, point and mark as 2 args. */
813 Bufpos tem = check_mark();
815 (BUF_PT(current_buffer) <
816 tem ? Fcopy_marker(current_buffer->
819 : current_buffer->mark);
820 varies[argnum] = Qregion_beginning;
822 (BUF_PT(current_buffer) >
823 tem ? Fcopy_marker(current_buffer->
826 : current_buffer->mark);
827 varies[argnum] = Qregion_end;
830 case 's': /* String read via minibuffer. */
833 call1(Qread_string, PROMPT());
837 case 'S': /* Any symbol. */
839 visargs[argnum] = Qnil;
842 call5(Qcompleting_read,
847 /* nil, or prev attempt */
849 visargs[argnum] = tem;
850 /* I could use condition-case with this loser, but why bother?
851 * tem = Fread (tem); check-symbol-p;
853 tem = Fintern(tem, Qnil);
856 (XSYMBOL(tem)->name) > 0)
857 /* Don't accept the empty-named symbol. If the loser
858 really wants this s/he can call completing-read
865 case 'v': /* Variable name: user-variable-p symbol */
868 call1(Qread_variable, PROMPT());
873 case 'x': /* Lisp expression read but not evaluated */
876 call1(Qread_expression, PROMPT());
877 /* visargs[argnum] = Fprin1_to_string (args[argnum], Qnil); */
881 case 'X': /* Lisp expression read and evaluated */
884 call1(Qread_expression, PROMPT());
885 /* visargs[argnum] = Fprin1_to_string (tem, Qnil); */
886 args[argnum] = Feval(tem);
890 case 'Z': /* Coding-system symbol or nil if no prefix */
892 #if defined(MULE) || defined(FILE_CODING)
898 (Qread_non_nil_coding_system,
907 case 'z': /* Coding-system symbol */
909 #if defined(MULE) || defined(FILE_CODING)
911 call1(Qread_coding_system,
920 /* We have a case for `+' so we get an error
921 if anyone tries to define one here. */
926 ("Invalid `interactive' control letter \"%c\" (#o%03o).",
927 prompt_data[prompt_index],
928 prompt_data[prompt_index]);
932 if (NILP(visargs[argnum]))
933 visargs[argnum] = args[argnum];
937 if (STRINGP(specs)) {
938 prompt_data = (char *)XSTRING_DATA(specs);
940 /* +1 to skip spec, +1 for \n */
941 prompt_index += prompt_length + 1 + 1;
943 unbind_to(speccount, Qnil);
947 if (EQ(record_flag, Qlambda)) {
948 RETURN_UNGCPRO(Flist(argcount, args));
951 if (arg_from_tty || !NILP(record_flag)) {
952 /* Reuse visargs as a temporary for constructing the command history */
953 for (argnum = 0; argnum < argcount; argnum++) {
954 if (!NILP(varies[argnum]))
955 visargs[argnum] = list1(varies[argnum]);
958 Fquote_maybe(args[argnum]);
961 Fcons(Fcons(args[-1], Flist(argcount, visargs)),
965 /* If we used a marker to hold point, mark, or an end of the region,
966 temporarily, convert it to an integer now. */
967 for (argnum = 0; argnum < argcount; argnum++)
968 if (!NILP(varies[argnum]))
969 XSETINT(args[argnum],
970 marker_position(args[argnum]));
972 single_console_state();
973 specbind(Qcommand_debug_status, Qnil);
974 fun = Ffuncall(argcount + 1, args - 1);
976 if (set_zmacs_region_stays)
977 zmacs_region_stays = 1;
978 return unbind_to(speccount, fun);
982 DEFUN("prefix-numeric-value", Fprefix_numeric_value, 1, 1, 0, /*
983 Return numeric meaning of raw prefix argument RAW.
984 A raw prefix argument is what you get from `(interactive "P")'.
985 Its numeric meaning is what you would get from `(interactive "p")'.
995 if (CONSP(raw) && INTP(XCAR(raw)))
1001 void syms_of_callint(void)
1003 defsymbol(&Qcall_interactively, "call-interactively");
1004 defsymbol(&Qread_from_minibuffer, "read-from-minibuffer");
1005 defsymbol(&Qcompleting_read, "completing-read");
1006 defsymbol(&Qread_file_name, "read-file-name");
1007 defsymbol(&Qread_directory_name, "read-directory-name");
1008 defsymbol(&Qread_string, "read-string");
1009 defsymbol(&Qread_buffer, "read-buffer");
1010 defsymbol(&Qread_variable, "read-variable");
1011 defsymbol(&Qread_function, "read-function");
1012 defsymbol(&Qread_command, "read-command");
1013 defsymbol(&Qread_number, "read-number");
1014 defsymbol(&Qread_expression, "read-expression");
1015 #if defined(MULE) || defined(FILE_CODING)
1016 defsymbol(&Qread_coding_system, "read-coding-system");
1017 defsymbol(&Qread_non_nil_coding_system, "read-non-nil-coding-system");
1019 defsymbol(&Qevents_to_keys, "events-to-keys");
1020 defsymbol(&Qcommand_debug_status, "command-debug-status");
1021 defsymbol(&Qenable_recursive_minibuffers,
1022 "enable-recursive-minibuffers");
1024 defsymbol(&QletX, "let*");
1025 defsymbol(&Qsave_excursion, "save-excursion");
1026 #if 0 /* ill-conceived */
1027 defsymbol(&Qmouse_leave_buffer_hook, "mouse-leave-buffer-hook");
1030 DEFSUBR(Finteractive);
1031 DEFSUBR(Fquote_maybe);
1032 DEFSUBR(Fcall_interactively);
1033 DEFSUBR(Fprefix_numeric_value);
1036 void vars_of_callint(void)
1038 DEFVAR_LISP("current-prefix-arg", &Vcurrent_prefix_arg /*
1039 The value of the prefix argument for this editing command.
1040 It may be a number, or the symbol `-' for just a minus sign as arg,
1041 or a list whose car is a number for just one or more C-U's
1042 or nil if no argument has been specified.
1043 This is what `(interactive "P")' returns.
1045 Vcurrent_prefix_arg = Qnil;
1047 DEFVAR_LISP("command-history", &Vcommand_history /*
1048 List of recent commands that read arguments from terminal.
1049 Each command is represented as a form to evaluate.
1051 Vcommand_history = Qnil;
1053 DEFVAR_LISP("command-debug-status", &Vcommand_debug_status /*
1054 Debugging status of current interactive command.
1055 Bound each time `call-interactively' is called;
1056 may be set by the debugger as a reminder for itself.
1058 Vcommand_debug_status = Qnil;
1061 xxDEFVAR_LISP("mark-even-if-inactive", &Vmark_even_if_inactive /*
1062 *Non-nil means you can use the mark even when inactive.
1063 This option makes a difference in Transient Mark mode.
1064 When the option is non-nil, deactivation of the mark
1065 turns off region highlighting, but commands that use the mark
1066 behave as if the mark were still active.
1068 Vmark_even_if_inactive = Qnil;
1071 #if 0 /* Doesn't work and is totally ill-conceived anyway. */
1072 xxDEFVAR_LISP("mouse-leave-buffer-hook", &Vmouse_leave_buffer_hook /*
1073 Hook to run when about to switch windows with a mouse command.
1074 Its purpose is to give temporary modes such as Isearch mode
1075 a way to turn themselves off when a mouse command switches windows.
1077 Vmouse_leave_buffer_hook = Qnil;