aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann1999-09-26 10:53:23 +0000
committerGerd Moellmann1999-09-26 10:53:23 +0000
commit6c57709828b1597b1bd7cfcc3c5e67ba26946f19 (patch)
tree97110855a0360fcb74847dfafe1d785341020529 /src
parent0b0737d1c74782f08b9bf8b48783545bc8bb318d (diff)
downloademacs-6c57709828b1597b1bd7cfcc3c5e67ba26946f19.tar.gz
emacs-6c57709828b1597b1bd7cfcc3c5e67ba26946f19.zip
(display_prop_end, invisible_text_between_p): Use
next_single_char_property_change.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c32
1 files changed, 9 insertions, 23 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index cd05bbda5de..e5ffabb3c43 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2243,7 +2243,7 @@ handle_display_prop (it)
2243} 2243}
2244 2244
2245 2245
2246/* Value is the position of the end of the `display' property stating 2246/* Value is the position of the end of the `display' property starting
2247 at START_POS in OBJECT. */ 2247 at START_POS in OBJECT. */
2248 2248
2249static struct text_pos 2249static struct text_pos
@@ -2254,27 +2254,14 @@ display_prop_end (it, object, start_pos)
2254{ 2254{
2255 Lisp_Object end; 2255 Lisp_Object end;
2256 struct text_pos end_pos; 2256 struct text_pos end_pos;
2257
2258 /* Characters having this form of property are not displayed, so
2259 we have to find the end of the property. */
2260 end = Fnext_single_property_change (make_number (start_pos.charpos),
2261 Qdisplay, object, Qnil);
2262 if (NILP (end))
2263 {
2264 /* A nil value of `end' means there are no changes of the
2265 property to the end of the buffer or string. */
2266 if (it->current.overlay_string_index >= 0)
2267 end_pos.charpos = XSTRING (it->string)->size;
2268 else
2269 end_pos.charpos = it->end_charpos;
2270 }
2271 else
2272 end_pos.charpos = XFASTINT (end);
2273 2257
2274 if (STRINGP (it->string)) 2258 end = next_single_char_property_change (make_number (CHARPOS (start_pos)),
2259 Qdisplay, object, Qnil);
2260 CHARPOS (end_pos) = XFASTINT (end);
2261 if (STRINGP (object))
2275 compute_string_pos (&end_pos, start_pos, it->string); 2262 compute_string_pos (&end_pos, start_pos, it->string);
2276 else 2263 else
2277 end_pos.bytepos = CHAR_TO_BYTE (end_pos.charpos); 2264 BYTEPOS (end_pos) = CHAR_TO_BYTE (XFASTINT (end));
2278 2265
2279 return end_pos; 2266 return end_pos;
2280} 2267}
@@ -4430,10 +4417,9 @@ invisible_text_between_p (it, start_charpos, end_charpos)
4430 invisible_found_p = 1; 4417 invisible_found_p = 1;
4431 else 4418 else
4432 { 4419 {
4433 limit = Fnext_single_property_change (make_number (start_charpos), 4420 limit = next_single_char_property_change (make_number (start_charpos),
4434 Qinvisible, 4421 Qinvisible, Qnil,
4435 Fcurrent_buffer (), 4422 make_number (end_charpos));
4436 make_number (end_charpos));
4437 invisible_found_p = XFASTINT (limit) < end_charpos; 4423 invisible_found_p = XFASTINT (limit) < end_charpos;
4438 } 4424 }
4439 4425