aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJim Blandy1992-10-11 06:39:13 +0000
committerJim Blandy1992-10-11 06:39:13 +0000
commitbc78232cf6e1a6b9ba154017d160bfbe0e265de2 (patch)
treeeb723f2e224181e44401509eead1f2153b495f8a /src
parent9712b0bd2ecd77fd3210cea4de1a7470b4c67f0a (diff)
downloademacs-bc78232cf6e1a6b9ba154017d160bfbe0e265de2.tar.gz
emacs-bc78232cf6e1a6b9ba154017d160bfbe0e265de2.zip
* callint.c (Fcall_interactively): Allow multiple 'e' specs.
(Finteractive): Doc fix.
Diffstat (limited to 'src')
-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\
66C -- Command name: symbol with interactive function definition.\n\ 66C -- Command name: symbol with interactive function definition.\n\
67d -- Value of point as number. Does not do I/O.\n\ 67d -- Value of point as number. Does not do I/O.\n\
68D -- Directory name.\n\ 68D -- Directory name.\n\
69e -- Mouse click that invoked this command (value of `last-nonmenu-event').\n\ 69e -- Event that invoked this command (value of `last-nonmenu-event').\n\
70 This skips events without parameters.\n\
71 If used more than once, the Nth 'e' returns the Nth parameterized event.\n\
70f -- Existing file name.\n\ 72f -- Existing file name.\n\
71F -- Possibly nonexistent file name.\n\ 73F -- Possibly nonexistent file name.\n\
72k -- Key sequence (string).\n\ 74k -- Key sequence (string).\n\
@@ -160,6 +162,10 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
160 Lisp_Object enable; 162 Lisp_Object enable;
161 int speccount = specpdl_ptr - specpdl; 163 int speccount = specpdl_ptr - specpdl;
162 164
165 /* The index of the next element of this_command_keys to examine for
166 the 'e' interactive code. */
167 int next_event = 0;
168
163 Lisp_Object prefix_arg; 169 Lisp_Object prefix_arg;
164 unsigned char *string; 170 unsigned char *string;
165 unsigned char *tem; 171 unsigned char *tem;
@@ -391,13 +397,17 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
391 visargs[i] = Fkey_description (teml); 397 visargs[i] = Fkey_description (teml);
392 break; 398 break;
393 399
394 case 'e': /* Mouse click. */ 400 case 'e': /* The invoking event. */
395 args[i] = last_command_char; 401 /* Find the next parameterized event. */
396 if (NILP (Fmouse_click_p (args[i]))) 402 while (next_event < this_command_key_count
397 error ("%s must be bound to a mouse click.", 403 && ! EVENT_HAS_PARAMETERS (this_command_keys[next_event]))
404 next_event++;
405 if (next_event >= this_command_key_count)
406 error ("%s must be bound to an event with parameters",
398 (XTYPE (function) == Lisp_Symbol 407 (XTYPE (function) == Lisp_Symbol
399 ? (char *) XSYMBOL (function)->name->data 408 ? (char *) XSYMBOL (function)->name->data
400 : "Command")); 409 : "command"));
410 args[i] = this_command_keys[next_event++];
401 varies[i] = -1; 411 varies[i] = -1;
402 break; 412 break;
403 413