Mercurial > emacs
changeset 9800:476dc2f97d11
(read_key_sequence): Use flags instead of gotos to
enable the Microsoft C compiler to compile the routine.
(read_avail_input) [WINDOWSNT]: Just return 0.
(make_lispy_event): Record double and triple for drags.
Put in click_modifier for multi-clicks.
(read_key_sequence): Convert double-drag first to plan drag,
and only later try a click.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 01 Nov 1994 08:49:40 +0000 |
parents | c9c11e41bf07 |
children | 7003b5184aec |
files | src/keyboard.c |
diffstat | 1 files changed, 30 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/src/keyboard.c Tue Nov 01 08:47:47 1994 +0000 +++ b/src/keyboard.c Tue Nov 01 08:49:40 1994 +0000 @@ -2877,18 +2877,19 @@ if (EQ (event->x, XCONS (down)->car) && EQ (event->y, XCONS (down)->cdr)) { - if (is_double && double_click_count > 1) - event->modifiers |= ((double_click_count > 2) - ? triple_modifier - : double_modifier); - else - event->modifiers |= click_modifier; + event->modifiers |= click_modifier; } else { button_down_time = 0; event->modifiers |= drag_modifier; } + /* Don't check is_double; treat this as multiple + if the down-event was multiple. */ + if (double_click_count > 1) + event->modifiers |= ((double_click_count > 2) + ? triple_modifier + : double_modifier); } } else @@ -3591,6 +3592,9 @@ int n_to_read; /* Determine how many characters we should *try* to read. */ +#ifdef WINDOWSNT + return 0; +#else /* not WINDOWSNT */ #ifdef MSDOS n_to_read = dos_keysns (); if (n_to_read == 0) @@ -3620,6 +3624,7 @@ #endif #endif #endif /* not MSDOS */ +#endif /* not WINDOWSNT */ /* Now read; for one reason or another, this will not block. NREAD is set to the number of chars read. */ @@ -4518,6 +4523,9 @@ Lisp_Object first_event; #endif + /* Gets around Microsoft compiler limitations. */ + int dummyFlag = 0; + struct buffer *starting_buffer; /* Nonzero if we seem to have got the beginning of a binding @@ -4710,7 +4718,10 @@ if (INTEGERP (key) && XINT (key) == -1) { t = 0; - goto done; + /* The Microsoft C compiler can't handle the goto that + would go here. */ + dummyFlag = 1; + break; } /* If the current buffer has been changed from under us, the @@ -4887,7 +4898,9 @@ read_key_sequence_cmd = Vprefix_help_command; keybuf[t++] = key; last_nonmenu_event = key; - goto done; + /* The Microsoft C compiler can't handle the goto that + would go here. */ + dummyFlag = 1; } if (SYMBOLP (head)) @@ -4915,8 +4928,10 @@ Lisp_Object new_head, new_click; if (modifiers & triple_modifier) modifiers ^= (double_modifier | triple_modifier); - else if (modifiers & (drag_modifier | double_modifier)) - modifiers &= ~(drag_modifier | double_modifier); + else if (modifiers & double_modifier) + modifiers &= ~double_modifier; + else if (modifiers & drag_modifier) + modifiers &= ~drag_modifier; else { /* Dispose of this `down' event by simply jumping @@ -5238,11 +5253,11 @@ } } - read_key_sequence_cmd = (first_binding < nmaps - ? defs[first_binding] - : Qnil); - - done: + if (!dummyFlag) + read_key_sequence_cmd = (first_binding < nmaps + ? defs[first_binding] + : Qnil); + unread_switch_frame = delayed_switch_frame; unbind_to (count, Qnil);