diff options
| author | Richard M. Stallman | 1998-06-14 19:03:11 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-06-14 19:03:11 +0000 |
| commit | cdfac812762e9247e957408625b41332dfcdad30 (patch) | |
| tree | 31af15c0c947ff5cafd436989ef2e03739e7b6a5 /src | |
| parent | 5c6f2f2a477cc27374db11077745e62cb30aaeb2 (diff) | |
| download | emacs-cdfac812762e9247e957408625b41332dfcdad30.tar.gz emacs-cdfac812762e9247e957408625b41332dfcdad30.zip | |
(Fcall_interactively) <k, K>: If sequence ends in a down
event, discard following up event.
Diffstat (limited to 'src')
| -rw-r--r-- | src/callint.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/callint.c b/src/callint.c index 479372a6c8c..eb60907d7f6 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -553,6 +553,21 @@ Otherwise, this is done only if an arg is read using the minibuffer.") | |||
| 553 | unbind_to (speccount1, Qnil); | 553 | unbind_to (speccount1, Qnil); |
| 554 | teml = args[i]; | 554 | teml = args[i]; |
| 555 | visargs[i] = Fkey_description (teml); | 555 | visargs[i] = Fkey_description (teml); |
| 556 | |||
| 557 | /* If the key sequence ends with a down-event, | ||
| 558 | discard the following up-event. */ | ||
| 559 | teml = Faref (args[i], make_number (XINT (Flength (args[i])) - 1)); | ||
| 560 | if (CONSP (teml)) | ||
| 561 | teml = XCONS (teml)->car; | ||
| 562 | if (SYMBOLP (teml)) | ||
| 563 | { | ||
| 564 | Lisp_Object tem2; | ||
| 565 | |||
| 566 | teml = Fget (teml, intern ("event-symbol-elements")); | ||
| 567 | tem2 = Fmemq (intern ("down"), teml); | ||
| 568 | if (! NILP (tem2)) | ||
| 569 | Fread_event (); | ||
| 570 | } | ||
| 556 | } | 571 | } |
| 557 | break; | 572 | break; |
| 558 | 573 | ||
| @@ -565,6 +580,21 @@ Otherwise, this is done only if an arg is read using the minibuffer.") | |||
| 565 | teml = args[i]; | 580 | teml = args[i]; |
| 566 | visargs[i] = Fkey_description (teml); | 581 | visargs[i] = Fkey_description (teml); |
| 567 | unbind_to (speccount1, Qnil); | 582 | unbind_to (speccount1, Qnil); |
| 583 | |||
| 584 | /* If the key sequence ends with a down-event, | ||
| 585 | discard the following up-event. */ | ||
| 586 | teml = Faref (args[i], make_number (XINT (Flength (args[i])) - 1)); | ||
| 587 | if (CONSP (teml)) | ||
| 588 | teml = XCONS (teml)->car; | ||
| 589 | if (SYMBOLP (teml)) | ||
| 590 | { | ||
| 591 | Lisp_Object tem2; | ||
| 592 | |||
| 593 | teml = Fget (teml, intern ("event-symbol-elements")); | ||
| 594 | tem2 = Fmemq (intern ("down"), teml); | ||
| 595 | if (! NILP (tem2)) | ||
| 596 | Fread_event (); | ||
| 597 | } | ||
| 568 | } | 598 | } |
| 569 | break; | 599 | break; |
| 570 | 600 | ||