diff options
| author | Jim Blandy | 1992-10-11 06:39:13 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-10-11 06:39:13 +0000 |
| commit | bc78232cf6e1a6b9ba154017d160bfbe0e265de2 (patch) | |
| tree | eb723f2e224181e44401509eead1f2153b495f8a | |
| parent | 9712b0bd2ecd77fd3210cea4de1a7470b4c67f0a (diff) | |
| download | emacs-bc78232cf6e1a6b9ba154017d160bfbe0e265de2.tar.gz emacs-bc78232cf6e1a6b9ba154017d160bfbe0e265de2.zip | |
* callint.c (Fcall_interactively): Allow multiple 'e' specs.
(Finteractive): Doc fix.
| -rw-r--r-- | src/callint.c | 22 |
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\ | |||
| 66 | C -- Command name: symbol with interactive function definition.\n\ | 66 | C -- Command name: symbol with interactive function definition.\n\ |
| 67 | d -- Value of point as number. Does not do I/O.\n\ | 67 | d -- Value of point as number. Does not do I/O.\n\ |
| 68 | D -- Directory name.\n\ | 68 | D -- Directory name.\n\ |
| 69 | e -- Mouse click that invoked this command (value of `last-nonmenu-event').\n\ | 69 | e -- 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\ | ||
| 70 | f -- Existing file name.\n\ | 72 | f -- Existing file name.\n\ |
| 71 | F -- Possibly nonexistent file name.\n\ | 73 | F -- Possibly nonexistent file name.\n\ |
| 72 | k -- Key sequence (string).\n\ | 74 | k -- 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 | ||