diff options
author | Richard M. Stallman <rms@gnu.org> | 1998-06-14 19:03:11 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1998-06-14 19:03:11 +0000 |
commit | cdfac812762e9247e957408625b41332dfcdad30 (patch) | |
tree | 31af15c0c947ff5cafd436989ef2e03739e7b6a5 /src/callint.c | |
parent | 5c6f2f2a477cc27374db11077745e62cb30aaeb2 (diff) | |
download | emacs-cdfac812762e9247e957408625b41332dfcdad30.tar.gz |
(Fcall_interactively) <k, K>: If sequence ends in a down
event, discard following up event.
Diffstat (limited to 'src/callint.c')
-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.") 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 @@ Otherwise, this is done only if an arg is read using the minibuffer.") 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; |