summaryrefslogtreecommitdiff
path: root/src/xfaces.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-11-20 09:43:41 +0000
committerRichard M. Stallman <rms@gnu.org>1993-11-20 09:43:41 +0000
commita5fc15e3c0f972ee3662284806689837cd5a3ff2 (patch)
tree073024477464b02a751620597d1f025a56429cf6 /src/xfaces.c
parent64e7c004633cbb8b145902d9a665cba7986e85d6 (diff)
downloademacs-a5fc15e3c0f972ee3662284806689837cd5a3ff2.tar.gz
(compute_char_face): Accept new arg LIMIT.
Pass Fnext_single_property_change its new arg LIMIT.
Diffstat (limited to 'src/xfaces.c')
-rw-r--r--src/xfaces.c13
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)
F is the frame in use for display, and W is a window displaying
the current buffer.
- REGION_BEG, REGION_END delimit the region, so it can be highlighted. */
+ REGION_BEG, REGION_END delimit the region, so it can be highlighted.
+
+ LIMIT is a position not to scan beyond. That is to limit
+ the time this function can take. */
int
-compute_char_face (f, w, pos, region_beg, region_end, endptr)
+compute_char_face (f, w, pos, region_beg, region_end, endptr, limit)
struct frame *f;
struct window *w;
int pos;
int region_beg, region_end;
int *endptr;
+ int limit;
{
struct face face;
Lisp_Object prop, position;
@@ -757,9 +761,10 @@ compute_char_face (f, w, pos, region_beg, region_end, endptr)
XFASTINT (position) = pos;
prop = Fget_text_property (position, Qface, w->buffer);
{
- Lisp_Object end;
+ Lisp_Object limit1, end;
- end = Fnext_single_property_change (position, Qface, w->buffer);
+ XFASTINT (limit1) = (limit < endpos ? limit : endpos);
+ end = Fnext_single_property_change (position, Qface, w->buffer, limit1);
if (INTEGERP (end))
endpos = XINT (end);
}