diff options
| author | Gerd Moellmann | 2001-06-26 12:31:30 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-06-26 12:31:30 +0000 |
| commit | fdbb67fec74be182a25755ce5a6e3019256998dd (patch) | |
| tree | c736745d0aff1f4eb9d3fbea0733858e638fe785 /src | |
| parent | 10e65e4185e95c0e099302cfd3dae498a32e2c24 (diff) | |
| download | emacs-fdbb67fec74be182a25755ce5a6e3019256998dd.tar.gz emacs-fdbb67fec74be182a25755ce5a6e3019256998dd.zip | |
(read_char) <non_reread>: Record the previous idle
start time before calling timer_stop_idle.
(read_char) <reread_first>: After processing a help-echo event,
restore the previous idle start time.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/keyboard.c | 13 |
2 files changed, 16 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6e51be5b1c7..46986d2fb5a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2001-06-26 Gerd Moellmann <gerd@gnu.org> | 1 | 2001-06-26 Gerd Moellmann <gerd@gnu.org> |
| 2 | 2 | ||
| 3 | * keyboard.c (read_char) <non_reread>: Record the previous idle | ||
| 4 | start time before calling timer_stop_idle. | ||
| 5 | (read_char) <reread_first>: After processing a help-echo event, | ||
| 6 | restore the previous idle start time. | ||
| 7 | |||
| 3 | * xdisp.c (handle_invisible_prop): Deal with overlay strings at | 8 | * xdisp.c (handle_invisible_prop): Deal with overlay strings at |
| 4 | the start of invisible text. | 9 | the start of invisible text. |
| 5 | (setup_for_ellipsis): New function. | 10 | (setup_for_ellipsis): New function. |
diff --git a/src/keyboard.c b/src/keyboard.c index 18c1f3e1e3a..927e986b268 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -644,6 +644,10 @@ Lisp_Object Vdisable_point_adjustment; | |||
| 644 | 644 | ||
| 645 | Lisp_Object Vglobal_disable_point_adjustment; | 645 | Lisp_Object Vglobal_disable_point_adjustment; |
| 646 | 646 | ||
| 647 | /* The time when Emacs started being idle. */ | ||
| 648 | |||
| 649 | static EMACS_TIME timer_idleness_start_time; | ||
| 650 | |||
| 647 | 651 | ||
| 648 | /* Global variable declarations. */ | 652 | /* Global variable declarations. */ |
| 649 | 653 | ||
| @@ -2095,6 +2099,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 2095 | volatile Lisp_Object also_record; | 2099 | volatile Lisp_Object also_record; |
| 2096 | volatile int reread; | 2100 | volatile int reread; |
| 2097 | struct gcpro gcpro1, gcpro2; | 2101 | struct gcpro gcpro1, gcpro2; |
| 2102 | EMACS_TIME last_idle_start; | ||
| 2098 | 2103 | ||
| 2099 | also_record = Qnil; | 2104 | also_record = Qnil; |
| 2100 | 2105 | ||
| @@ -2588,6 +2593,9 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 2588 | 2593 | ||
| 2589 | non_reread: | 2594 | non_reread: |
| 2590 | 2595 | ||
| 2596 | /* Record the last idle start time so that we can reset it | ||
| 2597 | should the next event read be a help-echo. */ | ||
| 2598 | last_idle_start = timer_idleness_start_time; | ||
| 2591 | timer_stop_idle (); | 2599 | timer_stop_idle (); |
| 2592 | start_polling (); | 2600 | start_polling (); |
| 2593 | 2601 | ||
| @@ -2804,6 +2812,9 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 2804 | object = Fnth (make_number (4), c); | 2812 | object = Fnth (make_number (4), c); |
| 2805 | position = Fnth (make_number (5), c); | 2813 | position = Fnth (make_number (5), c); |
| 2806 | show_help_echo (help, window, object, position, 0); | 2814 | show_help_echo (help, window, object, position, 0); |
| 2815 | |||
| 2816 | /* We stopped being idle for this event; undo that. */ | ||
| 2817 | timer_idleness_start_time = last_idle_start; | ||
| 2807 | goto retry; | 2818 | goto retry; |
| 2808 | } | 2819 | } |
| 2809 | 2820 | ||
| @@ -3824,8 +3835,6 @@ swallow_events (do_display) | |||
| 3824 | redisplay_preserve_echo_area (7); | 3835 | redisplay_preserve_echo_area (7); |
| 3825 | } | 3836 | } |
| 3826 | 3837 | ||
| 3827 | static EMACS_TIME timer_idleness_start_time; | ||
| 3828 | |||
| 3829 | /* Record the start of when Emacs is idle, | 3838 | /* Record the start of when Emacs is idle, |
| 3830 | for the sake of running idle-time timers. */ | 3839 | for the sake of running idle-time timers. */ |
| 3831 | 3840 | ||