comparison src/xdisp.c @ 13519:aee6ea2166bc

(display_text_line): Handle redisplay_end_trigger before getting the face of the next character. Reset next_face_change.
author Richard M. Stallman <rms@gnu.org>
date Sat, 11 Nov 1995 22:12:30 +0000
parents a0fd601c9d5b
children 3daf8244546e
comparison
equal deleted inserted replaced
13518:9e55dae21315 13519:aee6ea2166bc
2709 *p2x++ = pos; 2709 *p2x++ = pos;
2710 } 2710 }
2711 break; 2711 break;
2712 } 2712 }
2713 2713
2714 /* Figure out where (if at all) the
2715 redisplay_end_trigger-hook should run. */
2716 if (MARKERP (w->redisplay_end_trigger)
2717 && XMARKER (w->redisplay_end_trigger)->buffer != 0)
2718 e_t_h = marker_position (w->redisplay_end_trigger);
2719 else if (INTEGERP (w->redisplay_end_trigger))
2720 e_t_h = XINT (w->redisplay_end_trigger);
2721 else
2722 e_t_h = ZV;
2723
2724 /* If we've gone past the place to run a hook,
2725 run the hook. */
2726 if (pos >= e_t_h && e_t_h != ZV)
2727 {
2728 Frun_hooks (1, &Qredisplay_end_trigger_hook);
2729 w->redisplay_end_trigger = Qnil;
2730 e_t_h = ZV;
2731 /* Notice if it changed the face of this character. */
2732 next_face_change = pos;
2733 }
2734
2714 #ifdef HAVE_FACES 2735 #ifdef HAVE_FACES
2715 /* Did we hit a face change? Figure out what face we should 2736 /* Did we hit a face change? Figure out what face we should
2716 use now. We also hit this the first time through the 2737 use now. We also hit this the first time through the
2717 loop, to see what face we should start with. */ 2738 loop, to see what face we should start with. */
2718 if (pos >= next_face_change && (FRAME_WINDOW_P (f))) 2739 if (pos >= next_face_change && (FRAME_WINDOW_P (f)))
2719 current_face = compute_char_face (f, w, pos, 2740 current_face = compute_char_face (f, w, pos,
2720 region_beg, region_end, 2741 region_beg, region_end,
2721 &next_face_change, pos + 50, 0); 2742 &next_face_change, pos + 50, 0);
2722 #endif 2743 #endif
2723
2724 /* Figure out where (if at all) the
2725 redisplay_end_trigger-hook should run. */
2726 if (MARKERP (w->redisplay_end_trigger))
2727 e_t_h = marker_position (w->redisplay_end_trigger);
2728 else if (INTEGERP (w->redisplay_end_trigger))
2729 e_t_h = XINT (w->redisplay_end_trigger);
2730 else
2731 e_t_h = ZV;
2732
2733 /* If we've gone past the place to run a hook,
2734 run the hook. */
2735 if (pos >= e_t_h && e_t_h != ZV)
2736 {
2737 Frun_hooks (1, &Qredisplay_end_trigger_hook);
2738 w->redisplay_end_trigger = Qnil;
2739 e_t_h = ZV;
2740 }
2741 2744
2742 /* Compute the next place we need to stop 2745 /* Compute the next place we need to stop
2743 and do something special; set PAUSE. */ 2746 and do something special; set PAUSE. */
2744 2747
2745 pause = ZV; 2748 pause = ZV;