summaryrefslogtreecommitdiff
path: root/src/callint.c
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1992-10-11 06:39:13 +0000
committerJim Blandy <jimb@redhat.com>1992-10-11 06:39:13 +0000
commit08983738bcde9cc4089d9d7925e6f42f66b4e34f (patch)
tree205f084bc6167dd2245755ab02b7bc104ea2b354 /src/callint.c
parent01bba629cfaa35f3284f25f882602ddf44db336a (diff)
downloademacs-08983738bcde9cc4089d9d7925e6f42f66b4e34f.tar.gz
* callint.c (Fcall_interactively): Allow multiple 'e' specs.
(Finteractive): Doc fix.
Diffstat (limited to 'src/callint.c')
-rw-r--r--src/callint.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/callint.c b/src/callint.c
index 99a364f6127..87c5057cb40 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -66,7 +66,9 @@ c -- Character.\n\
C -- Command name: symbol with interactive function definition.\n\
d -- Value of point as number. Does not do I/O.\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 -- Possibly nonexistent file name.\n\
k -- Key sequence (string).\n\
@@ -160,6 +162,10 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
Lisp_Object enable;
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;
unsigned char *string;
unsigned char *tem;
@@ -391,13 +397,17 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
visargs[i] = Fkey_description (teml);
break;
- case 'e': /* Mouse click. */
- args[i] = last_command_char;
- if (NILP (Fmouse_click_p (args[i])))
- error ("%s must be bound to a mouse click.",
+ case 'e': /* The invoking event. */
+ /* Find the next parameterized event. */
+ while (next_event < this_command_key_count
+ && ! 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
? (char *) XSYMBOL (function)->name->data
- : "Command"));
+ : "command"));
+ args[i] = this_command_keys[next_event++];
varies[i] = -1;
break;