diff options
| author | Richard M. Stallman | 1993-11-20 09:43:41 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-11-20 09:43:41 +0000 |
| commit | b349f4fb74edd57c81f187d01aadfb79e91e9748 (patch) | |
| tree | 485f6c17a3c2ed557a1f24a2035188f28e79308e /src | |
| parent | 90b5299acd3eb7e00209c07e0b25894353a956ed (diff) | |
| download | emacs-b349f4fb74edd57c81f187d01aadfb79e91e9748.tar.gz emacs-b349f4fb74edd57c81f187d01aadfb79e91e9748.zip | |
(compute_char_face): Accept new arg LIMIT.
Pass Fnext_single_property_change its new arg LIMIT.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xfaces.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index f2a26a52def..6cba032b7e6 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -724,15 +724,19 @@ sort_overlays (s1, s2) | |||
| 724 | F is the frame in use for display, and W is a window displaying | 724 | F is the frame in use for display, and W is a window displaying |
| 725 | the current buffer. | 725 | the current buffer. |
| 726 | 726 | ||
| 727 | REGION_BEG, REGION_END delimit the region, so it can be highlighted. */ | 727 | REGION_BEG, REGION_END delimit the region, so it can be highlighted. |
| 728 | |||
| 729 | LIMIT is a position not to scan beyond. That is to limit | ||
| 730 | the time this function can take. */ | ||
| 728 | 731 | ||
| 729 | int | 732 | int |
| 730 | compute_char_face (f, w, pos, region_beg, region_end, endptr) | 733 | compute_char_face (f, w, pos, region_beg, region_end, endptr, limit) |
| 731 | struct frame *f; | 734 | struct frame *f; |
| 732 | struct window *w; | 735 | struct window *w; |
| 733 | int pos; | 736 | int pos; |
| 734 | int region_beg, region_end; | 737 | int region_beg, region_end; |
| 735 | int *endptr; | 738 | int *endptr; |
| 739 | int limit; | ||
| 736 | { | 740 | { |
| 737 | struct face face; | 741 | struct face face; |
| 738 | Lisp_Object prop, position; | 742 | Lisp_Object prop, position; |
| @@ -757,9 +761,10 @@ compute_char_face (f, w, pos, region_beg, region_end, endptr) | |||
| 757 | XFASTINT (position) = pos; | 761 | XFASTINT (position) = pos; |
| 758 | prop = Fget_text_property (position, Qface, w->buffer); | 762 | prop = Fget_text_property (position, Qface, w->buffer); |
| 759 | { | 763 | { |
| 760 | Lisp_Object end; | 764 | Lisp_Object limit1, end; |
| 761 | 765 | ||
| 762 | end = Fnext_single_property_change (position, Qface, w->buffer); | 766 | XFASTINT (limit1) = (limit < endpos ? limit : endpos); |
| 767 | end = Fnext_single_property_change (position, Qface, w->buffer, limit1); | ||
| 763 | if (INTEGERP (end)) | 768 | if (INTEGERP (end)) |
| 764 | endpos = XINT (end); | 769 | endpos = XINT (end); |
| 765 | } | 770 | } |