aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c98
1 files changed, 23 insertions, 75 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index d4bdde452b5..01ca4533321 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -889,10 +889,6 @@ static Lisp_Object get_it_property P_ ((struct it *it, Lisp_Object prop));
889 889
890static void handle_line_prefix P_ ((struct it *)); 890static void handle_line_prefix P_ ((struct it *));
891 891
892#if 0
893static int invisible_text_between_p P_ ((struct it *, int, int));
894#endif
895
896static void pint2str P_ ((char *, int, int)); 892static void pint2str P_ ((char *, int, int));
897static void pint2hrstr P_ ((char *, int, int)); 893static void pint2hrstr P_ ((char *, int, int));
898static struct text_pos run_window_scroll_functions P_ ((Lisp_Object, 894static struct text_pos run_window_scroll_functions P_ ((Lisp_Object,
@@ -3108,6 +3104,7 @@ handle_stop (it)
3108 it->current.dpvec_index = -1; 3104 it->current.dpvec_index = -1;
3109 handle_overlay_change_p = !it->ignore_overlay_strings_at_pos_p; 3105 handle_overlay_change_p = !it->ignore_overlay_strings_at_pos_p;
3110 it->ignore_overlay_strings_at_pos_p = 0; 3106 it->ignore_overlay_strings_at_pos_p = 0;
3107 it->ellipsis_p = 0;
3111 3108
3112 /* Use face of preceding text for ellipsis (if invisible) */ 3109 /* Use face of preceding text for ellipsis (if invisible) */
3113 if (it->selective_display_ellipsis_p) 3110 if (it->selective_display_ellipsis_p)
@@ -3128,10 +3125,14 @@ handle_stop (it)
3128 { 3125 {
3129 /* We still want to show before and after strings from 3126 /* We still want to show before and after strings from
3130 overlays even if the actual buffer text is replaced. */ 3127 overlays even if the actual buffer text is replaced. */
3131 if (!handle_overlay_change_p || it->sp > 1) 3128 if (!handle_overlay_change_p
3132 return; 3129 || it->sp > 1
3133 if (!get_overlay_strings_1 (it, 0, 0)) 3130 || !get_overlay_strings_1 (it, 0, 0))
3134 return; 3131 {
3132 if (it->ellipsis_p)
3133 setup_for_ellipsis (it, 0);
3134 return;
3135 }
3135 it->ignore_overlay_strings_at_pos_p = 1; 3136 it->ignore_overlay_strings_at_pos_p = 1;
3136 it->string_from_display_prop_p = 0; 3137 it->string_from_display_prop_p = 0;
3137 handle_overlay_change_p = 0; 3138 handle_overlay_change_p = 0;
@@ -3155,6 +3156,12 @@ handle_stop (it)
3155 if (handle_overlay_change_p) 3156 if (handle_overlay_change_p)
3156 handled = handle_overlay_change (it); 3157 handled = handle_overlay_change (it);
3157 } 3158 }
3159
3160 if (it->ellipsis_p)
3161 {
3162 setup_for_ellipsis (it, 0);
3163 break;
3164 }
3158 } 3165 }
3159 while (handled == HANDLED_RECOMPUTE_PROPS); 3166 while (handled == HANDLED_RECOMPUTE_PROPS);
3160 3167
@@ -3838,7 +3845,7 @@ handle_invisible_prop (it)
3838 it->position.charpos = IT_CHARPOS (*it) - 1; 3845 it->position.charpos = IT_CHARPOS (*it) - 1;
3839 it->position.bytepos = CHAR_TO_BYTE (it->position.charpos); 3846 it->position.bytepos = CHAR_TO_BYTE (it->position.charpos);
3840 } 3847 }
3841 setup_for_ellipsis (it, 0); 3848 it->ellipsis_p = 1;
3842 /* Let the ellipsis display before 3849 /* Let the ellipsis display before
3843 considering any properties of the following char. 3850 considering any properties of the following char.
3844 Fixes jasonr@gnu.org 01 Oct 07 bug. */ 3851 Fixes jasonr@gnu.org 01 Oct 07 bug. */
@@ -4860,8 +4867,8 @@ next_overlay_string (it)
4860 /* No more overlay strings. Restore IT's settings to what 4867 /* No more overlay strings. Restore IT's settings to what
4861 they were before overlay strings were processed, and 4868 they were before overlay strings were processed, and
4862 continue to deliver from current_buffer. */ 4869 continue to deliver from current_buffer. */
4863 int display_ellipsis_p = it->stack[it->sp - 1].display_ellipsis_p;
4864 4870
4871 it->ellipsis_p = (it->stack[it->sp - 1].display_ellipsis_p != 0);
4865 pop_it (it); 4872 pop_it (it);
4866 xassert (it->sp > 0 4873 xassert (it->sp > 0
4867 || it->method == GET_FROM_COMPOSITION 4874 || it->method == GET_FROM_COMPOSITION
@@ -4877,11 +4884,6 @@ next_overlay_string (it)
4877 next_element_from_buffer doesn't try it again. */ 4884 next_element_from_buffer doesn't try it again. */
4878 if (NILP (it->string) && IT_CHARPOS (*it) >= it->end_charpos) 4885 if (NILP (it->string) && IT_CHARPOS (*it) >= it->end_charpos)
4879 it->overlay_strings_at_end_processed_p = 1; 4886 it->overlay_strings_at_end_processed_p = 1;
4880
4881 /* If we have to display `...' for invisible text, set
4882 the iterator up for that. */
4883 if (display_ellipsis_p)
4884 setup_for_ellipsis (it, 0);
4885 } 4887 }
4886 else 4888 else
4887 { 4889 {
@@ -6193,7 +6195,12 @@ set_iterator_to_next (it, reseat_p)
6193 /* IT->string is an overlay string. Advance to the 6195 /* IT->string is an overlay string. Advance to the
6194 next, if there is one. */ 6196 next, if there is one. */
6195 if (IT_STRING_CHARPOS (*it) >= SCHARS (it->string)) 6197 if (IT_STRING_CHARPOS (*it) >= SCHARS (it->string))
6196 next_overlay_string (it); 6198 {
6199 it->ellipsis_p = 0;
6200 next_overlay_string (it);
6201 if (it->ellipsis_p)
6202 setup_for_ellipsis (it, 0);
6203 }
6197 } 6204 }
6198 else 6205 else
6199 { 6206 {
@@ -7502,41 +7509,6 @@ move_it_past_eol (it)
7502} 7509}
7503 7510
7504 7511
7505#if 0 /* Currently not used. */
7506
7507/* Return non-zero if some text between buffer positions START_CHARPOS
7508 and END_CHARPOS is invisible. IT->window is the window for text
7509 property lookup. */
7510
7511static int
7512invisible_text_between_p (it, start_charpos, end_charpos)
7513 struct it *it;
7514 int start_charpos, end_charpos;
7515{
7516 Lisp_Object prop, limit;
7517 int invisible_found_p;
7518
7519 xassert (it != NULL && start_charpos <= end_charpos);
7520
7521 /* Is text at START invisible? */
7522 prop = Fget_char_property (make_number (start_charpos), Qinvisible,
7523 it->window);
7524 if (TEXT_PROP_MEANS_INVISIBLE (prop))
7525 invisible_found_p = 1;
7526 else
7527 {
7528 limit = Fnext_single_char_property_change (make_number (start_charpos),
7529 Qinvisible, Qnil,
7530 make_number (end_charpos));
7531 invisible_found_p = XFASTINT (limit) < end_charpos;
7532 }
7533
7534 return invisible_found_p;
7535}
7536
7537#endif /* 0 */
7538
7539
7540/* Move IT by a specified number DVPOS of screen lines down. DVPOS 7512/* Move IT by a specified number DVPOS of screen lines down. DVPOS
7541 negative means move up. DVPOS == 0 means move to the start of the 7513 negative means move up. DVPOS == 0 means move to the start of the
7542 screen line. NEED_Y_P non-zero means calculate IT->current_y. If 7514 screen line. NEED_Y_P non-zero means calculate IT->current_y. If
@@ -9677,15 +9649,6 @@ update_menu_bar (f, save_match_data, hooks_run)
9677 window = FRAME_SELECTED_WINDOW (f); 9649 window = FRAME_SELECTED_WINDOW (f);
9678 w = XWINDOW (window); 9650 w = XWINDOW (window);
9679 9651
9680#if 0 /* The if statement below this if statement used to include the
9681 condition !NILP (w->update_mode_line), rather than using
9682 update_mode_lines directly, and this if statement may have
9683 been added to make that condition work. Now the if
9684 statement below matches its comment, this isn't needed. */
9685 if (update_mode_lines)
9686 w->update_mode_line = Qt;
9687#endif
9688
9689 if (FRAME_WINDOW_P (f) 9652 if (FRAME_WINDOW_P (f)
9690 ? 9653 ?
9691#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \ 9654#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \
@@ -11876,11 +11839,6 @@ redisplay_internal (preserve_echo_area)
11876 /* Update the display. */ 11839 /* Update the display. */
11877 set_window_update_flags (XWINDOW (f->root_window), 1); 11840 set_window_update_flags (XWINDOW (f->root_window), 1);
11878 pause |= update_frame (f, 0, 0); 11841 pause |= update_frame (f, 0, 0);
11879#if 0 /* Exiting the loop can leave the wrong value for buffer_shared. */
11880 if (pause)
11881 break;
11882#endif
11883
11884 f->updated_p = 1; 11842 f->updated_p = 1;
11885 } 11843 }
11886 } 11844 }
@@ -12174,11 +12132,6 @@ mark_window_display_accurate_1 (w, accurate_p)
12174 if (accurate_p) 12132 if (accurate_p)
12175 { 12133 {
12176 w->window_end_valid = w->buffer; 12134 w->window_end_valid = w->buffer;
12177#if 0 /* This is incorrect with variable-height lines. */
12178 xassert (XINT (w->window_end_vpos)
12179 < (WINDOW_TOTAL_LINES (w)
12180 - (WINDOW_WANTS_MODELINE_P (w) ? 1 : 0)));
12181#endif
12182 w->update_mode_line = Qnil; 12135 w->update_mode_line = Qnil;
12183 } 12136 }
12184} 12137}
@@ -13810,11 +13763,6 @@ redisplay_window (window, just_this_one_p)
13810 { 13763 {
13811 init_iterator (&it, w, PT, PT_BYTE, NULL, DEFAULT_FACE_ID); 13764 init_iterator (&it, w, PT, PT_BYTE, NULL, DEFAULT_FACE_ID);
13812 move_it_vertically_backward (&it, 0); 13765 move_it_vertically_backward (&it, 0);
13813#if 0
13814 /* I think this assert is bogus if buffer contains
13815 invisible text or images. KFS. */
13816 xassert (IT_CHARPOS (it) <= PT);
13817#endif
13818 it.current_y = 0; 13766 it.current_y = 0;
13819 } 13767 }
13820 13768