Commit bc78232c authored by Jim Blandy's avatar Jim Blandy

* callint.c (Fcall_interactively): Allow multiple 'e' specs.

	(Finteractive): Doc fix.
parent 9712b0bd
...@@ -66,7 +66,9 @@ c -- Character.\n\ ...@@ -66,7 +66,9 @@ c -- Character.\n\
C -- Command name: symbol with interactive function definition.\n\ C -- Command name: symbol with interactive function definition.\n\
d -- Value of point as number. Does not do I/O.\n\ d -- Value of point as number. Does not do I/O.\n\
D -- Directory name.\n\ D -- Directory name.\n\
e -- Mouse click that invoked this command (value of `last-nonmenu-event').\n\ e -- Event that invoked this command (value of `last-nonmenu-event').\n\
This skips events without parameters.\n\
If used more than once, the Nth 'e' returns the Nth parameterized event.\n\
f -- Existing file name.\n\ f -- Existing file name.\n\
F -- Possibly nonexistent file name.\n\ F -- Possibly nonexistent file name.\n\
k -- Key sequence (string).\n\ k -- Key sequence (string).\n\
...@@ -160,6 +162,10 @@ Otherwise, this is done only if an arg is read using the minibuffer.") ...@@ -160,6 +162,10 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
Lisp_Object enable; Lisp_Object enable;
int speccount = specpdl_ptr - specpdl; int speccount = specpdl_ptr - specpdl;
/* The index of the next element of this_command_keys to examine for
the 'e' interactive code. */
int next_event = 0;
Lisp_Object prefix_arg; Lisp_Object prefix_arg;
unsigned char *string; unsigned char *string;
unsigned char *tem; unsigned char *tem;
...@@ -391,13 +397,17 @@ Otherwise, this is done only if an arg is read using the minibuffer.") ...@@ -391,13 +397,17 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
visargs[i] = Fkey_description (teml); visargs[i] = Fkey_description (teml);
break; break;
case 'e': /* Mouse click. */ case 'e': /* The invoking event. */
args[i] = last_command_char; /* Find the next parameterized event. */
if (NILP (Fmouse_click_p (args[i]))) while (next_event < this_command_key_count
error ("%s must be bound to a mouse click.", && ! EVENT_HAS_PARAMETERS (this_command_keys[next_event]))
next_event++;
if (next_event >= this_command_key_count)
error ("%s must be bound to an event with parameters",
(XTYPE (function) == Lisp_Symbol (XTYPE (function) == Lisp_Symbol
? (char *) XSYMBOL (function)->name->data ? (char *) XSYMBOL (function)->name->data
: "Command")); : "command"));
args[i] = this_command_keys[next_event++];
varies[i] = -1; varies[i] = -1;
break; break;
......
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