diff options
| author | Richard M. Stallman | 1994-05-07 19:47:44 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-05-07 19:47:44 +0000 |
| commit | b8556aee0013f940a2439ed0738f9511f1deb077 (patch) | |
| tree | 148b3ea2537b780eab75c9ef96927a3f8deaaac5 /src | |
| parent | e7a8b7911b45c73cab0c17130517c3d401c6b6d0 (diff) | |
| download | emacs-b8556aee0013f940a2439ed0738f9511f1deb077.tar.gz emacs-b8556aee0013f940a2439ed0738f9511f1deb077.zip | |
(read_char): Don't text do_mouse_tracking;
instead, do prepare_menu_bars only if commandflag > 1.
Do call add_command_key for mouse-movement events.
Test detect_input_pending, not EVENT_QUEUES_EMPTY, for kbd menus.
But don't test either one for mouse menus.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 900833c2dcb..54fab603a72 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1460,8 +1460,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 1460 | /* Don't bother updating menu bars while doing mouse tracking. | 1460 | /* Don't bother updating menu bars while doing mouse tracking. |
| 1461 | We get events very rapidly then, and the menu bar won't be changing. | 1461 | We get events very rapidly then, and the menu bar won't be changing. |
| 1462 | We do update the menu bar once on entry to Ftrack_mouse. */ | 1462 | We do update the menu bar once on entry to Ftrack_mouse. */ |
| 1463 | if (!do_mouse_tracking && | 1463 | if (commandflag > 0 && !input_pending && !detect_input_pending ()) |
| 1464 | commandflag >= 0 && !input_pending && !detect_input_pending ()) | ||
| 1465 | prepare_menu_bars (); | 1464 | prepare_menu_bars (); |
| 1466 | 1465 | ||
| 1467 | /* Save outer setjmp data, in case called recursively. */ | 1466 | /* Save outer setjmp data, in case called recursively. */ |
| @@ -1505,7 +1504,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 1505 | /* Don't bring up a menu if we already have another event. */ | 1504 | /* Don't bring up a menu if we already have another event. */ |
| 1506 | && NILP (Vunread_command_events) | 1505 | && NILP (Vunread_command_events) |
| 1507 | && unread_command_char < 0 | 1506 | && unread_command_char < 0 |
| 1508 | && EVENT_QUEUES_EMPTY) | 1507 | && !detect_input_pending ()) |
| 1509 | { | 1508 | { |
| 1510 | c = read_char_minibuf_menu_prompt (commandflag, nmaps, maps); | 1509 | c = read_char_minibuf_menu_prompt (commandflag, nmaps, maps); |
| 1511 | if (! NILP (c)) | 1510 | if (! NILP (c)) |
| @@ -1555,8 +1554,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 1555 | && !NILP (prev_event) && EVENT_HAS_PARAMETERS (prev_event) | 1554 | && !NILP (prev_event) && EVENT_HAS_PARAMETERS (prev_event) |
| 1556 | /* Don't bring up a menu if we already have another event. */ | 1555 | /* Don't bring up a menu if we already have another event. */ |
| 1557 | && NILP (Vunread_command_events) | 1556 | && NILP (Vunread_command_events) |
| 1558 | && unread_command_char < 0 | 1557 | && unread_command_char < 0) |
| 1559 | && EVENT_QUEUES_EMPTY) | ||
| 1560 | c = read_char_x_menu_prompt (nmaps, maps, prev_event, used_mouse_menu); | 1558 | c = read_char_x_menu_prompt (nmaps, maps, prev_event, used_mouse_menu); |
| 1561 | 1559 | ||
| 1562 | /* Slow down auto saves logarithmically in size of current buffer, | 1560 | /* Slow down auto saves logarithmically in size of current buffer, |
| @@ -1693,14 +1691,14 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 1693 | from_macro: | 1691 | from_macro: |
| 1694 | reread_first: | 1692 | reread_first: |
| 1695 | 1693 | ||
| 1696 | /* Record this character as part of the current key. | 1694 | /* Don't echo mouse motion events. */ |
| 1697 | Don't record mouse motion; it should never matter. */ | ||
| 1698 | if (! (EVENT_HAS_PARAMETERS (c) | 1695 | if (! (EVENT_HAS_PARAMETERS (c) |
| 1699 | && EQ (EVENT_HEAD_KIND (EVENT_HEAD (c)), Qmouse_movement))) | 1696 | && EQ (EVENT_HEAD_KIND (EVENT_HEAD (c)), Qmouse_movement))) |
| 1700 | { | 1697 | echo_char (c); |
| 1701 | echo_char (c); | 1698 | |
| 1702 | add_command_key (c); | 1699 | /* Record this character as part of the current key. |
| 1703 | } | 1700 | Don't record mouse motion; it should never matter. */ |
| 1701 | add_command_key (c); | ||
| 1704 | 1702 | ||
| 1705 | /* Re-reading in the middle of a command */ | 1703 | /* Re-reading in the middle of a command */ |
| 1706 | reread: | 1704 | reread: |