Mercurial > emacs
changeset 22485:b469abbc9984
(Fcall_interactively) <k, K>: If sequence ends in a down
event, discard following up event.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 14 Jun 1998 19:03:11 +0000 |
parents | 661650f543ee |
children | a28020246db1 |
files | src/callint.c |
diffstat | 1 files changed, 30 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/callint.c Sun Jun 14 19:01:34 1998 +0000 +++ b/src/callint.c Sun Jun 14 19:03:11 1998 +0000 @@ -553,6 +553,21 @@ unbind_to (speccount1, Qnil); teml = args[i]; visargs[i] = Fkey_description (teml); + + /* If the key sequence ends with a down-event, + discard the following up-event. */ + teml = Faref (args[i], make_number (XINT (Flength (args[i])) - 1)); + if (CONSP (teml)) + teml = XCONS (teml)->car; + if (SYMBOLP (teml)) + { + Lisp_Object tem2; + + teml = Fget (teml, intern ("event-symbol-elements")); + tem2 = Fmemq (intern ("down"), teml); + if (! NILP (tem2)) + Fread_event (); + } } break; @@ -565,6 +580,21 @@ teml = args[i]; visargs[i] = Fkey_description (teml); unbind_to (speccount1, Qnil); + + /* If the key sequence ends with a down-event, + discard the following up-event. */ + teml = Faref (args[i], make_number (XINT (Flength (args[i])) - 1)); + if (CONSP (teml)) + teml = XCONS (teml)->car; + if (SYMBOLP (teml)) + { + Lisp_Object tem2; + + teml = Fget (teml, intern ("event-symbol-elements")); + tem2 = Fmemq (intern ("down"), teml); + if (! NILP (tem2)) + Fread_event (); + } } break;