Mercurial > hg > xemacs-beta
comparison src/extents.c @ 771:943eaba38521
[xemacs-hg @ 2002-03-13 08:51:24 by ben]
The big ben-mule-21-5 check-in!
Various files were added and deleted. See CHANGES-ben-mule.
There are still some test suite failures. No crashes, though.
Many of the failures have to do with problems in the test suite itself
rather than in the actual code. I'll be addressing these in the next
day or so -- none of the test suite failures are at all critical.
Meanwhile I'll be trying to address the biggest issues -- i.e. build
or run failures, which will almost certainly happen on various platforms.
All comments should be sent to ben@xemacs.org -- use a Cc: if necessary
when sending to mailing lists. There will be pre- and post- tags,
something like
pre-ben-mule-21-5-merge-in, and
post-ben-mule-21-5-merge-in.
author | ben |
---|---|
date | Wed, 13 Mar 2002 08:54:06 +0000 |
parents | fdefd0186b75 |
children | e38acbeb1cae |
comparison
equal
deleted
inserted
replaced
770:336a418893b5 | 771:943eaba38521 |
---|---|
1196 { | 1196 { |
1197 struct extent_info *data = XEXTENT_INFO (b->extent_info); | 1197 struct extent_info *data = XEXTENT_INFO (b->extent_info); |
1198 | 1198 |
1199 /* Don't destroy the extents here -- there may still be children | 1199 /* Don't destroy the extents here -- there may still be children |
1200 extents pointing to the extents. */ | 1200 extents pointing to the extents. */ |
1201 detach_all_extents (make_buffer (b)); | 1201 detach_all_extents (wrap_buffer (b)); |
1202 finalize_extent_info (data, 0); | 1202 finalize_extent_info (data, 0); |
1203 } | 1203 } |
1204 | 1204 |
1205 /* Retrieve the extent list that an extent is a member of; the | 1205 /* Retrieve the extent list that an extent is a member of; the |
1206 return value will never be 0 except in destroyed buffers (in which | 1206 return value will never be 0 except in destroyed buffers (in which |
1212 /* ------------------------------- */ | 1212 /* ------------------------------- */ |
1213 /* stack of extents */ | 1213 /* stack of extents */ |
1214 /* ------------------------------- */ | 1214 /* ------------------------------- */ |
1215 | 1215 |
1216 #ifdef ERROR_CHECK_EXTENTS | 1216 #ifdef ERROR_CHECK_EXTENTS |
1217 | |
1218 /* See unicode.c for more about sledgehammer checks */ | |
1217 | 1219 |
1218 void | 1220 void |
1219 sledgehammer_extent_check (Lisp_Object object) | 1221 sledgehammer_extent_check (Lisp_Object object) |
1220 { | 1222 { |
1221 int i; | 1223 int i; |
2266 /* ---------- Finished looping. ---------- */ | 2268 /* ---------- Finished looping. ---------- */ |
2267 } | 2269 } |
2268 | 2270 |
2269 if (flags & ME_MIGHT_THROW) | 2271 if (flags & ME_MIGHT_THROW) |
2270 /* This deletes the range extent and frees the marker. */ | 2272 /* This deletes the range extent and frees the marker. */ |
2271 unbind_to (count, Qnil); | 2273 unbind_to (count); |
2272 else | 2274 else |
2273 { | 2275 { |
2274 /* Delete them ourselves */ | 2276 /* Delete them ourselves */ |
2275 if (range) | 2277 if (range) |
2276 extent_detach (range); | 2278 extent_detach (range); |
4724 inside_change_hook gets restored in case we throw. Also record | 4726 inside_change_hook gets restored in case we throw. Also record |
4725 the current buffer, in case we change it. Do the recording only | 4727 the current buffer, in case we change it. Do the recording only |
4726 once. | 4728 once. |
4727 | 4729 |
4728 One confusing thing here is that our caller never actually calls | 4730 One confusing thing here is that our caller never actually calls |
4729 unbind_to (closure.speccount, Qnil). This is because | 4731 unbind_to (closure.speccount). This is because |
4730 map_extents_bytebpos() unbinds before, and with a smaller | 4732 map_extents_bytebpos() unbinds before, and with a smaller |
4731 speccount. The additional unbind_to() in | 4733 speccount. The additional unbind_to_1() in |
4732 report_extent_modification() would cause XEmacs to abort. */ | 4734 report_extent_modification() would cause XEmacs to abort. */ |
4733 if (closure->speccount == -1) | 4735 if (closure->speccount == -1) |
4734 { | 4736 { |
4735 closure->speccount = specpdl_depth (); | 4737 closure->speccount = specpdl_depth (); |
4736 record_unwind_protect (report_extent_modification_restore, | 4738 record_unwind_protect (report_extent_modification_restore, |
5857 Lisp_Object buffer; | 5859 Lisp_Object buffer; |
5858 | 5860 |
5859 closure.from = opoint; | 5861 closure.from = opoint; |
5860 closure.length = length; | 5862 closure.length = length; |
5861 closure.string = string; | 5863 closure.string = string; |
5862 buffer = make_buffer (buf); | 5864 buffer = wrap_buffer (buf); |
5863 GCPRO2 (buffer, string); | 5865 GCPRO2 (buffer, string); |
5864 map_extents_bytebpos (opoint, opoint + length, add_string_extents_mapper, | 5866 map_extents_bytebpos (opoint, opoint + length, add_string_extents_mapper, |
5865 (void *) &closure, buffer, 0, | 5867 (void *) &closure, buffer, 0, |
5866 /* ignore extents that just abut the region */ | 5868 /* ignore extents that just abut the region */ |
5867 ME_END_CLOSED | ME_ALL_EXTENTS_OPEN | | 5869 ME_END_CLOSED | ME_ALL_EXTENTS_OPEN | |
5926 { | 5928 { |
5927 struct splice_in_string_extents_arg closure; | 5929 struct splice_in_string_extents_arg closure; |
5928 struct gcpro gcpro1, gcpro2; | 5930 struct gcpro gcpro1, gcpro2; |
5929 Lisp_Object buffer; | 5931 Lisp_Object buffer; |
5930 | 5932 |
5931 buffer = make_buffer (buf); | 5933 buffer = wrap_buffer (buf); |
5932 closure.opoint = opoint; | 5934 closure.opoint = opoint; |
5933 closure.pos = pos; | 5935 closure.pos = pos; |
5934 closure.length = length; | 5936 closure.length = length; |
5935 closure.buffer = buffer; | 5937 closure.buffer = buffer; |
5936 GCPRO2 (buffer, string); | 5938 GCPRO2 (buffer, string); |
6916 staticpro (&Vlast_highlighted_extent); | 6918 staticpro (&Vlast_highlighted_extent); |
6917 Vlast_highlighted_extent = Qnil; | 6919 Vlast_highlighted_extent = Qnil; |
6918 | 6920 |
6919 Vextent_face_reusable_list = Fcons (Qnil, Qnil); | 6921 Vextent_face_reusable_list = Fcons (Qnil, Qnil); |
6920 staticpro (&Vextent_face_reusable_list); | 6922 staticpro (&Vextent_face_reusable_list); |
6921 } | 6923 |
6922 | |
6923 void | |
6924 complex_vars_of_extents (void) | |
6925 { | |
6926 staticpro (&Vextent_face_memoize_hash_table); | 6924 staticpro (&Vextent_face_memoize_hash_table); |
6927 /* The memoize hash table maps from lists of symbols to lists of | 6925 /* The memoize hash table maps from lists of symbols to lists of |
6928 faces. It needs to be `equal' to implement the memoization. | 6926 faces. It needs to be `equal' to implement the memoization. |
6929 The reverse table maps in the other direction and just needs | 6927 The reverse table maps in the other direction and just needs |
6930 to do `eq' comparison because the lists of faces are already | 6928 to do `eq' comparison because the lists of faces are already |