diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/callint.c | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/src/callint.c b/src/callint.c index f85ff113bcb..723224310f2 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -64,10 +64,10 @@ c -- Character.\n\ | |||
| 64 | C -- Command name: symbol with interactive function definition.\n\ | 64 | C -- Command name: symbol with interactive function definition.\n\ |
| 65 | d -- Value of point as number. Does not do I/O.\n\ | 65 | d -- Value of point as number. Does not do I/O.\n\ |
| 66 | D -- Directory name.\n\ | 66 | D -- Directory name.\n\ |
| 67 | e -- Last mouse event.\n\ | ||
| 68 | f -- Existing file name.\n\ | 67 | f -- Existing file name.\n\ |
| 69 | F -- Possibly nonexistent file name.\n\ | 68 | F -- Possibly nonexistent file name.\n\ |
| 70 | k -- Key sequence (string).\n\ | 69 | k -- Key sequence (string).\n\ |
| 70 | K -- Mouse click that invoked this command - last-command-char.\n\ | ||
| 71 | m -- Value of mark as number. Does not do I/O.\n\ | 71 | m -- Value of mark as number. Does not do I/O.\n\ |
| 72 | n -- Number read using minibuffer.\n\ | 72 | n -- Number read using minibuffer.\n\ |
| 73 | N -- Prefix arg converted to number, or if none, do like code `n'.\n\ | 73 | N -- Prefix arg converted to number, or if none, do like code `n'.\n\ |
| @@ -159,7 +159,12 @@ Otherwise, this is done only if an arg is read using the minibuffer.") | |||
| 159 | Lisp_Object prefix_arg; | 159 | Lisp_Object prefix_arg; |
| 160 | unsigned char *string; | 160 | unsigned char *string; |
| 161 | unsigned char *tem; | 161 | unsigned char *tem; |
| 162 | |||
| 163 | /* If varies[i] > 0, the i'th argument shouldn't just have its value | ||
| 164 | in this call quoted in the command history. It should be | ||
| 165 | recorded as a call to the function named callint_argfuns[varies[i]]. */ | ||
| 162 | int *varies; | 166 | int *varies; |
| 167 | |||
| 163 | register int i, j; | 168 | register int i, j; |
| 164 | int count, foo; | 169 | int count, foo; |
| 165 | char prompt[100]; | 170 | char prompt[100]; |
| @@ -173,8 +178,10 @@ Otherwise, this is done only if an arg is read using the minibuffer.") | |||
| 173 | 178 | ||
| 174 | retry: | 179 | retry: |
| 175 | 180 | ||
| 176 | fun = function; | 181 | for (fun = function; |
| 177 | while (XTYPE (fun) == Lisp_Symbol && !EQ (fun, Qunbound)) fun = XSYMBOL (fun)->function; | 182 | XTYPE (fun) == Lisp_Symbol && !EQ (fun, Qunbound); |
| 183 | fun = XSYMBOL (fun)->function) | ||
| 184 | ; | ||
| 178 | 185 | ||
| 179 | specs = Qnil; | 186 | specs = Qnil; |
| 180 | string = 0; | 187 | string = 0; |
| @@ -349,11 +356,6 @@ retry: | |||
| 349 | varies[i] = 1; | 356 | varies[i] = 1; |
| 350 | break; | 357 | break; |
| 351 | 358 | ||
| 352 | case 'e': | ||
| 353 | varies[i] = 1; | ||
| 354 | args[i] = Vmouse_event; | ||
| 355 | break; | ||
| 356 | |||
| 357 | case 'D': /* Directory name. */ | 359 | case 'D': /* Directory name. */ |
| 358 | args[i] = Fread_file_name (build_string (prompt), Qnil, | 360 | args[i] = Fread_file_name (build_string (prompt), Qnil, |
| 359 | current_buffer->directory, Qlambda, Qnil); | 361 | current_buffer->directory, Qlambda, Qnil); |
| @@ -370,11 +372,20 @@ retry: | |||
| 370 | break; | 372 | break; |
| 371 | 373 | ||
| 372 | case 'k': /* Key sequence (string) */ | 374 | case 'k': /* Key sequence (string) */ |
| 373 | args[i] = Fread_key_sequence (build_string (prompt)); | 375 | args[i] = Fread_key_sequence (build_string (prompt), Qnil); |
| 374 | teml = args[i]; | 376 | teml = args[i]; |
| 375 | visargs[i] = Fkey_description (teml); | 377 | visargs[i] = Fkey_description (teml); |
| 376 | break; | 378 | break; |
| 377 | 379 | ||
| 380 | case 'K': /* Mouse click. */ | ||
| 381 | args[i] = last_command_char; | ||
| 382 | if (NULL (Fmouse_click_p (args[i]))) | ||
| 383 | error ("%s must be bound to a mouse click.", | ||
| 384 | (XTYPE (function) == Lisp_Symbol | ||
| 385 | ? (char *) XSYMBOL (function)->name->data | ||
| 386 | : "Command")); | ||
| 387 | break; | ||
| 388 | |||
| 378 | case 'm': /* Value of mark. Does not do I/O. */ | 389 | case 'm': /* Value of mark. Does not do I/O. */ |
| 379 | check_mark (); | 390 | check_mark (); |
| 380 | /* visargs[i] = Qnil; */ | 391 | /* visargs[i] = Qnil; */ |
| @@ -474,7 +485,8 @@ retry: | |||
| 474 | if (arg_from_tty || !NULL (record)) | 485 | if (arg_from_tty || !NULL (record)) |
| 475 | { | 486 | { |
| 476 | visargs[0] = function; | 487 | visargs[0] = function; |
| 477 | for (i = 1; i < count + 1; i++ if (varies[i] > 0) | 488 | for (i = 1; i < count + 1; i++) |
| 489 | if (varies[i] > 0) | ||
| 478 | visargs[i] = Fcons (intern (callint_argfuns[varies[i]]), Qnil); | 490 | visargs[i] = Fcons (intern (callint_argfuns[varies[i]]), Qnil); |
| 479 | else | 491 | else |
| 480 | visargs[i] = quotify_arg (args[i]); | 492 | visargs[i] = quotify_arg (args[i]); |