Mercurial > emacs
comparison src/xdisp.c @ 13266:d6bba071525c
(try_window_id): Stop the compute_motion at ZV, not Z,
when checking if all changes are below the window.
(Qredisplay_end_trigger_hook): New variable.
(syms_of_xdisp): Set up Lisp variable.
(display_text_line): Run the hook when appropriate.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 21 Oct 1995 23:16:16 +0000 |
parents | 95fbb5bd0a5a |
children | 941c37982f37 |
comparison
equal
deleted
inserted
replaced
13265:dbc038e66ea6 | 13266:d6bba071525c |
---|---|
48 extern Lisp_Object Voverriding_local_map; | 48 extern Lisp_Object Voverriding_local_map; |
49 extern Lisp_Object Voverriding_local_map_menu_flag; | 49 extern Lisp_Object Voverriding_local_map_menu_flag; |
50 | 50 |
51 Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map; | 51 Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map; |
52 Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions; | 52 Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions; |
53 Lisp_Object Qredisplay_end_trigger_hook; | |
53 | 54 |
54 /* Nonzero means print newline to stdout before next minibuffer message. */ | 55 /* Nonzero means print newline to stdout before next minibuffer message. */ |
55 | 56 |
56 int noninteractive_need_newline; | 57 int noninteractive_need_newline; |
57 | 58 |
1909 width, hscroll, pos_tab_offset (w, start), w); | 1910 width, hscroll, pos_tab_offset (w, start), w); |
1910 if (bp.vpos >= height) | 1911 if (bp.vpos >= height) |
1911 { | 1912 { |
1912 if (PT < bp.bufpos) | 1913 if (PT < bp.bufpos) |
1913 { | 1914 { |
1914 /* All changes are below the frame, and point is on the frame. | 1915 /* All changes are beyond the window end, and point is on the screen. |
1915 We don't need to change the frame at all. | 1916 We don't need to change the text at all. |
1916 But we need to update window_end_pos to account for | 1917 But we need to update window_end_pos to account for |
1917 any change in buffer size. */ | 1918 any change in buffer size. */ |
1918 bp = *compute_motion (start, 0, lmargin, 0, | 1919 bp = *compute_motion (start, 0, lmargin, 0, |
1919 Z, height, 0, | 1920 ZV, height, 0, |
1920 width, hscroll, pos_tab_offset (w, start), w); | 1921 width, hscroll, pos_tab_offset (w, start), w); |
1921 XSETFASTINT (w->window_end_vpos, height); | 1922 XSETFASTINT (w->window_end_vpos, height); |
1922 XSETFASTINT (w->window_end_pos, Z - bp.bufpos); | 1923 XSETFASTINT (w->window_end_pos, Z - bp.bufpos); |
1923 goto findpoint; | 1924 goto findpoint; |
1924 } | 1925 } |
2614 prevpos = pos; | 2615 prevpos = pos; |
2615 while (1) | 2616 while (1) |
2616 { | 2617 { |
2617 if (pos >= pause) | 2618 if (pos >= pause) |
2618 { | 2619 { |
2620 int e_t_h; | |
2621 | |
2619 while (pos == next_boundary) | 2622 while (pos == next_boundary) |
2620 { | 2623 { |
2621 Lisp_Object position, limit, prop, ww; | 2624 Lisp_Object position, limit, prop, ww; |
2622 | 2625 |
2623 /* Display the overlay strings here, unless we're at ZV | 2626 /* Display the overlay strings here, unless we're at ZV |
2705 current_face = compute_char_face (f, w, pos, | 2708 current_face = compute_char_face (f, w, pos, |
2706 region_beg, region_end, | 2709 region_beg, region_end, |
2707 &next_face_change, pos + 50, 0); | 2710 &next_face_change, pos + 50, 0); |
2708 #endif | 2711 #endif |
2709 | 2712 |
2713 /* Figure out where (if at all) the | |
2714 redisplay_end_trigger-hook should run. */ | |
2715 if (MARKERP (current_buffer->redisplay_end_trigger)) | |
2716 e_t_h = marker_position (current_buffer->redisplay_end_trigger); | |
2717 else if (INTEGERP (current_buffer->redisplay_end_trigger)) | |
2718 e_t_h = XINT (current_buffer->redisplay_end_trigger); | |
2719 else | |
2720 e_t_h = ZV; | |
2721 | |
2722 /* If we've gone past the place to run a hook, | |
2723 run the hook. */ | |
2724 if (pos >= e_t_h && e_t_h != ZV) | |
2725 { | |
2726 call1 (Vrun_hooks, Qredisplay_end_trigger_hook); | |
2727 current_buffer->redisplay_end_trigger = Qnil; | |
2728 e_t_h = ZV; | |
2729 } | |
2730 | |
2731 /* Compute the next place we need to stop | |
2732 and do something special; set PAUSE. */ | |
2733 | |
2710 pause = ZV; | 2734 pause = ZV; |
2711 | 2735 |
2712 if (pos < next_boundary && next_boundary < pause) | 2736 if (pos < next_boundary && next_boundary < pause) |
2713 pause = next_boundary; | 2737 pause = next_boundary; |
2714 if (pos < next_face_change && next_face_change < pause) | 2738 if (pos < next_face_change && next_face_change < pause) |
2715 pause = next_face_change; | 2739 pause = next_face_change; |
2740 | |
2741 if (e_t_h < pause) | |
2742 pause = e_t_h; | |
2716 | 2743 |
2717 /* Wouldn't you hate to read the next line to someone over | 2744 /* Wouldn't you hate to read the next line to someone over |
2718 the phone? */ | 2745 the phone? */ |
2719 if (pos < PT && PT < pause) | 2746 if (pos < PT && PT < pause) |
2720 pause = PT; | 2747 pause = PT; |
4200 Qoverriding_local_map = intern ("overriding-local-map"); | 4227 Qoverriding_local_map = intern ("overriding-local-map"); |
4201 | 4228 |
4202 staticpro (&Qwindow_scroll_functions); | 4229 staticpro (&Qwindow_scroll_functions); |
4203 Qwindow_scroll_functions = intern ("window-scroll-functions"); | 4230 Qwindow_scroll_functions = intern ("window-scroll-functions"); |
4204 | 4231 |
4232 staticpro (&Qredisplay_end_trigger_hook); | |
4233 Qredisplay_end_trigger_hook = intern ("redisplay-end-trigger-hook"); | |
4234 | |
4205 staticpro (&last_arrow_position); | 4235 staticpro (&last_arrow_position); |
4206 staticpro (&last_arrow_string); | 4236 staticpro (&last_arrow_string); |
4207 last_arrow_position = Qnil; | 4237 last_arrow_position = Qnil; |
4208 last_arrow_string = Qnil; | 4238 last_arrow_string = Qnil; |
4209 | 4239 |