Mercurial > hg > xemacs-beta
comparison src/extents.c @ 2:ac2d302a0011 r19-15b2
Import from CVS: tag r19-15b2
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:46:35 +0200 |
parents | 376386a54a3c |
children | 9ee227acff29 |
comparison
equal
deleted
inserted
replaced
1:c0c6a60d29db | 2:ac2d302a0011 |
---|---|
973 it requires memory, a string's stack of extents is wiped out each | 973 it requires memory, a string's stack of extents is wiped out each |
974 time a garbage collection occurs. Therefore, any time you retrieve | 974 time a garbage collection occurs. Therefore, any time you retrieve |
975 the stack of extents, it might not be there. If you need it to | 975 the stack of extents, it might not be there. If you need it to |
976 be there, use the _force version. | 976 be there, use the _force version. |
977 | 977 |
978 Similarly, a string may or may not have an extent_info struture. | 978 Similarly, a string may or may not have an extent_info structure. |
979 (Generally it won't if there haven't been any extents added to the | 979 (Generally it won't if there haven't been any extents added to the |
980 string.) So use the _force version if you need the extent_info | 980 string.) So use the _force version if you need the extent_info |
981 structure to be there. */ | 981 structure to be there. */ |
982 | 982 |
983 static struct stack_of_extents *allocate_soe (void); | 983 static struct stack_of_extents *allocate_soe (void); |
6127 XSETEXTENT (extent, e); | 6127 XSETEXTENT (extent, e); |
6128 | 6128 |
6129 /* Note: in some cases when the property itself is 'start-open | 6129 /* Note: in some cases when the property itself is 'start-open |
6130 or 'end-closed, the checks to set the openness may do a bit | 6130 or 'end-closed, the checks to set the openness may do a bit |
6131 of extra work; but it won't hurt because we then fix up the | 6131 of extra work; but it won't hurt because we then fix up the |
6132 openness later in in put_text_prop_openness_mapper(). */ | 6132 openness later on in put_text_prop_openness_mapper(). */ |
6133 if (!EQ (Fextent_property (extent, Qtext_prop, Qnil), closure->prop)) | 6133 if (!EQ (Fextent_property (extent, Qtext_prop, Qnil), closure->prop)) |
6134 /* It's not for this property; do nothing. */ | 6134 /* It's not for this property; do nothing. */ |
6135 return 0; | 6135 return 0; |
6136 | 6136 |
6137 e_start = extent_endpoint_bytind (e, 0); | 6137 e_start = extent_endpoint_bytind (e, 0); |
6169 } | 6169 } |
6170 | 6170 |
6171 /* Even if we're adding a prop, at this point, we want all other extents of | 6171 /* Even if we're adding a prop, at this point, we want all other extents of |
6172 this prop to go away (as now they overlap). So the theory here is that, | 6172 this prop to go away (as now they overlap). So the theory here is that, |
6173 when we are adding a prop to a region that has multiple (disjoint) | 6173 when we are adding a prop to a region that has multiple (disjoint) |
6174 occurences of that prop in it already, we pick one of those and extend | 6174 occurrences of that prop in it already, we pick one of those and extend |
6175 it, and remove the others. | 6175 it, and remove the others. |
6176 */ | 6176 */ |
6177 | 6177 |
6178 else if (EQ (extent, closure->the_extent)) | 6178 else if (EQ (extent, closure->the_extent)) |
6179 { | 6179 { |