diff options
| author | Stefan Monnier | 2001-10-14 20:21:07 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2001-10-14 20:21:07 +0000 |
| commit | 8580a4e3e0b00cdda72314e7c44cc7f321c024b4 (patch) | |
| tree | 72f03ec7d28727fe2b343bdfd703c467b0250c3a | |
| parent | 67964c67c6b3f4601dc787b921425b621a3b23e7 (diff) | |
| download | emacs-8580a4e3e0b00cdda72314e7c44cc7f321c024b4.tar.gz emacs-8580a4e3e0b00cdda72314e7c44cc7f321c024b4.zip | |
(in_ellipses_for_invisible_text_p, handle_invisible_prop):
Use new retval of TEXT_PROP_MEANS_INVISIBLE.
| -rw-r--r-- | src/xdisp.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 02746f1df6c..08a378e689d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1789,9 +1789,7 @@ in_ellipses_for_invisible_text_p (pos, w) | |||
| 1789 | { | 1789 | { |
| 1790 | prop = Fget_char_property (make_number (charpos - 1), Qinvisible, | 1790 | prop = Fget_char_property (make_number (charpos - 1), Qinvisible, |
| 1791 | window); | 1791 | window); |
| 1792 | if (TEXT_PROP_MEANS_INVISIBLE (prop) | 1792 | ellipses_p = 2 == TEXT_PROP_MEANS_INVISIBLE (prop); |
| 1793 | && TEXT_PROP_MEANS_INVISIBLE_WITH_ELLIPSIS (prop)) | ||
| 1794 | ellipses_p = 1; | ||
| 1795 | } | 1793 | } |
| 1796 | 1794 | ||
| 1797 | return ellipses_p; | 1795 | return ellipses_p; |
| @@ -2567,7 +2565,7 @@ handle_invisible_prop (it) | |||
| 2567 | } | 2565 | } |
| 2568 | else | 2566 | else |
| 2569 | { | 2567 | { |
| 2570 | int visible_p, newpos, next_stop, start_charpos; | 2568 | int invis_p, newpos, next_stop, start_charpos; |
| 2571 | Lisp_Object pos, prop, overlay; | 2569 | Lisp_Object pos, prop, overlay; |
| 2572 | 2570 | ||
| 2573 | /* First of all, is there invisible text at this position? */ | 2571 | /* First of all, is there invisible text at this position? */ |
| @@ -2575,15 +2573,14 @@ handle_invisible_prop (it) | |||
| 2575 | pos = make_number (IT_CHARPOS (*it)); | 2573 | pos = make_number (IT_CHARPOS (*it)); |
| 2576 | prop = get_char_property_and_overlay (pos, Qinvisible, it->window, | 2574 | prop = get_char_property_and_overlay (pos, Qinvisible, it->window, |
| 2577 | &overlay); | 2575 | &overlay); |
| 2578 | 2576 | invis_p = TEXT_PROP_MEANS_INVISIBLE (prop); | |
| 2577 | |||
| 2579 | /* If we are on invisible text, skip over it. */ | 2578 | /* If we are on invisible text, skip over it. */ |
| 2580 | if (TEXT_PROP_MEANS_INVISIBLE (prop) | 2579 | if (invis_p && IT_CHARPOS (*it) < it->end_charpos) |
| 2581 | && IT_CHARPOS (*it) < it->end_charpos) | ||
| 2582 | { | 2580 | { |
| 2583 | /* Record whether we have to display an ellipsis for the | 2581 | /* Record whether we have to display an ellipsis for the |
| 2584 | invisible text. */ | 2582 | invisible text. */ |
| 2585 | int display_ellipsis_p | 2583 | int display_ellipsis_p = invis_p == 2; |
| 2586 | = TEXT_PROP_MEANS_INVISIBLE_WITH_ELLIPSIS (prop); | ||
| 2587 | 2584 | ||
| 2588 | handled = HANDLED_RECOMPUTE_PROPS; | 2585 | handled = HANDLED_RECOMPUTE_PROPS; |
| 2589 | 2586 | ||
| @@ -2603,26 +2600,26 @@ handle_invisible_prop (it) | |||
| 2603 | text in the first place. If everything to the end of | 2600 | text in the first place. If everything to the end of |
| 2604 | the buffer was skipped, end the loop. */ | 2601 | the buffer was skipped, end the loop. */ |
| 2605 | if (newpos == IT_CHARPOS (*it) || newpos >= ZV) | 2602 | if (newpos == IT_CHARPOS (*it) || newpos >= ZV) |
| 2606 | visible_p = 1; | 2603 | invis_p = 0; |
| 2607 | else | 2604 | else |
| 2608 | { | 2605 | { |
| 2609 | /* We skipped some characters but not necessarily | 2606 | /* We skipped some characters but not necessarily |
| 2610 | all there are. Check if we ended up on visible | 2607 | all there are. Check if we ended up on visible |
| 2611 | text. Fget_char_property returns the property of | 2608 | text. Fget_char_property returns the property of |
| 2612 | the char before the given position, i.e. if we | 2609 | the char before the given position, i.e. if we |
| 2613 | get visible_p = 1, this means that the char at | 2610 | get invis_p = 0, this means that the char at |
| 2614 | newpos is visible. */ | 2611 | newpos is visible. */ |
| 2615 | pos = make_number (newpos); | 2612 | pos = make_number (newpos); |
| 2616 | prop = Fget_char_property (pos, Qinvisible, it->window); | 2613 | prop = Fget_char_property (pos, Qinvisible, it->window); |
| 2617 | visible_p = !TEXT_PROP_MEANS_INVISIBLE (prop); | 2614 | invis_p = TEXT_PROP_MEANS_INVISIBLE (prop); |
| 2618 | } | 2615 | } |
| 2619 | 2616 | ||
| 2620 | /* If we ended up on invisible text, proceed to | 2617 | /* If we ended up on invisible text, proceed to |
| 2621 | skip starting with next_stop. */ | 2618 | skip starting with next_stop. */ |
| 2622 | if (!visible_p) | 2619 | if (invis_p) |
| 2623 | IT_CHARPOS (*it) = next_stop; | 2620 | IT_CHARPOS (*it) = next_stop; |
| 2624 | } | 2621 | } |
| 2625 | while (!visible_p); | 2622 | while (invis_p); |
| 2626 | 2623 | ||
| 2627 | /* The position newpos is now either ZV or on visible text. */ | 2624 | /* The position newpos is now either ZV or on visible text. */ |
| 2628 | IT_CHARPOS (*it) = newpos; | 2625 | IT_CHARPOS (*it) = newpos; |