Mercurial > emacs
comparison src/insdel.c @ 26404:c3c9cc1c2379
Remove USE_TEXT_PROPERTIES.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Thu, 11 Nov 1999 11:45:06 +0000 |
parents | b7aa6ac26872 |
children | 381c4e70f9fb |
comparison
equal
deleted
inserted
replaced
26403:03830fdf5186 | 26404:c3c9cc1c2379 |
---|---|
1063 ADJUST_CHAR_POS (GPT, GPT_BYTE); | 1063 ADJUST_CHAR_POS (GPT, GPT_BYTE); |
1064 ADJUST_CHAR_POS (Z, Z_BYTE); | 1064 ADJUST_CHAR_POS (Z, Z_BYTE); |
1065 ADJUST_CHAR_POS (ZV, ZV_BYTE); | 1065 ADJUST_CHAR_POS (ZV, ZV_BYTE); |
1066 | 1066 |
1067 if (BUF_INTERVALS (current_buffer) != 0) | 1067 if (BUF_INTERVALS (current_buffer) != 0) |
1068 /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES. */ | |
1069 offset_intervals (current_buffer, pos, - nbytes); | 1068 offset_intervals (current_buffer, pos, - nbytes); |
1070 } | 1069 } |
1071 | 1070 |
1072 void | 1071 void |
1073 byte_combining_error () | 1072 byte_combining_error () |
1183 adjust_markers_for_insert (PT, PT_BYTE, | 1182 adjust_markers_for_insert (PT, PT_BYTE, |
1184 PT + nchars, PT_BYTE + nbytes, | 1183 PT + nchars, PT_BYTE + nbytes, |
1185 combined_before_bytes, combined_after_bytes, | 1184 combined_before_bytes, combined_after_bytes, |
1186 before_markers); | 1185 before_markers); |
1187 | 1186 |
1188 #ifdef USE_TEXT_PROPERTIES | |
1189 if (BUF_INTERVALS (current_buffer) != 0) | 1187 if (BUF_INTERVALS (current_buffer) != 0) |
1190 /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES. */ | |
1191 offset_intervals (current_buffer, PT, nchars); | 1188 offset_intervals (current_buffer, PT, nchars); |
1192 | 1189 |
1193 if (!inherit && BUF_INTERVALS (current_buffer) != 0) | 1190 if (!inherit && BUF_INTERVALS (current_buffer) != 0) |
1194 Fset_text_properties (make_number (PT), make_number (PT + nchars), | 1191 Fset_text_properties (make_number (PT), make_number (PT + nchars), |
1195 Qnil, Qnil); | 1192 Qnil, Qnil); |
1196 #endif | |
1197 | 1193 |
1198 { | 1194 { |
1199 int pos = PT, pos_byte = PT_BYTE; | 1195 int pos = PT, pos_byte = PT_BYTE; |
1200 | 1196 |
1201 adjust_point (nchars + combined_after_bytes, | 1197 adjust_point (nchars + combined_after_bytes, |
1369 adjust_markers_for_insert (PT, PT_BYTE, PT + nchars, | 1365 adjust_markers_for_insert (PT, PT_BYTE, PT + nchars, |
1370 PT_BYTE + outgoing_nbytes, | 1366 PT_BYTE + outgoing_nbytes, |
1371 combined_before_bytes, combined_after_bytes, | 1367 combined_before_bytes, combined_after_bytes, |
1372 before_markers); | 1368 before_markers); |
1373 | 1369 |
1374 /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */ | |
1375 offset_intervals (current_buffer, PT, nchars); | 1370 offset_intervals (current_buffer, PT, nchars); |
1376 | 1371 |
1377 intervals = XSTRING (string)->intervals; | 1372 intervals = XSTRING (string)->intervals; |
1378 /* Get the intervals for the part of the string we are inserting-- | 1373 /* Get the intervals for the part of the string we are inserting-- |
1379 not including the combined-before bytes. */ | 1374 not including the combined-before bytes. */ |
1578 adjust_overlays_for_insert (PT, nchars); | 1573 adjust_overlays_for_insert (PT, nchars); |
1579 adjust_markers_for_insert (PT, PT_BYTE, PT + nchars, | 1574 adjust_markers_for_insert (PT, PT_BYTE, PT + nchars, |
1580 PT_BYTE + outgoing_nbytes, | 1575 PT_BYTE + outgoing_nbytes, |
1581 combined_before_bytes, combined_after_bytes, 0); | 1576 combined_before_bytes, combined_after_bytes, 0); |
1582 | 1577 |
1583 #ifdef USE_TEXT_PROPERTIES | |
1584 if (BUF_INTERVALS (current_buffer) != 0) | 1578 if (BUF_INTERVALS (current_buffer) != 0) |
1585 offset_intervals (current_buffer, PT, nchars); | 1579 offset_intervals (current_buffer, PT, nchars); |
1586 #endif | |
1587 | 1580 |
1588 /* Get the intervals for the part of the string we are inserting-- | 1581 /* Get the intervals for the part of the string we are inserting-- |
1589 not including the combined-before bytes. */ | 1582 not including the combined-before bytes. */ |
1590 intervals = BUF_INTERVALS (buf); | 1583 intervals = BUF_INTERVALS (buf); |
1591 if (outgoing_nbytes < BUF_Z_BYTE (buf) - BUF_BEG_BYTE (buf)) | 1584 if (outgoing_nbytes < BUF_Z_BYTE (buf) - BUF_BEG_BYTE (buf)) |
1733 | 1726 |
1734 if (len > nchars_del) | 1727 if (len > nchars_del) |
1735 adjust_overlays_for_insert (from, len - nchars_del); | 1728 adjust_overlays_for_insert (from, len - nchars_del); |
1736 else if (len < nchars_del) | 1729 else if (len < nchars_del) |
1737 adjust_overlays_for_delete (from, nchars_del - len); | 1730 adjust_overlays_for_delete (from, nchars_del - len); |
1738 #ifdef USE_TEXT_PROPERTIES | |
1739 if (BUF_INTERVALS (current_buffer) != 0) | 1731 if (BUF_INTERVALS (current_buffer) != 0) |
1740 { | 1732 { |
1741 offset_intervals (current_buffer, from, len - nchars_del); | 1733 offset_intervals (current_buffer, from, len - nchars_del); |
1742 } | 1734 } |
1743 #endif | |
1744 | 1735 |
1745 { | 1736 { |
1746 if (from < PT) | 1737 if (from < PT) |
1747 adjust_point (len - nchars_del, len_byte - nbytes_del); | 1738 adjust_point (len - nchars_del, len_byte - nbytes_del); |
1748 | 1739 |
2009 if (markers) | 2000 if (markers) |
2010 adjust_markers_for_insert (from, from_byte, | 2001 adjust_markers_for_insert (from, from_byte, |
2011 from + inschars, from_byte + outgoing_insbytes, | 2002 from + inschars, from_byte + outgoing_insbytes, |
2012 combined_before_bytes, combined_after_bytes, 0); | 2003 combined_before_bytes, combined_after_bytes, 0); |
2013 | 2004 |
2014 #ifdef USE_TEXT_PROPERTIES | |
2015 offset_intervals (current_buffer, from, inschars - nchars_del); | 2005 offset_intervals (current_buffer, from, inschars - nchars_del); |
2016 | 2006 |
2017 /* Get the intervals for the part of the string we are inserting-- | 2007 /* Get the intervals for the part of the string we are inserting-- |
2018 not including the combined-before bytes. */ | 2008 not including the combined-before bytes. */ |
2019 intervals = XSTRING (new)->intervals; | 2009 intervals = XSTRING (new)->intervals; |
2020 /* Insert those intervals. */ | 2010 /* Insert those intervals. */ |
2021 graft_intervals_into_buffer (intervals, from, inschars, | 2011 graft_intervals_into_buffer (intervals, from, inschars, |
2022 current_buffer, inherit); | 2012 current_buffer, inherit); |
2023 #endif | |
2024 | 2013 |
2025 /* Relocate point as if it were a marker. */ | 2014 /* Relocate point as if it were a marker. */ |
2026 if (from < PT) | 2015 if (from < PT) |
2027 adjust_point ((from + inschars - (PT < to ? PT : to)), | 2016 adjust_point ((from + inschars - (PT < to ? PT : to)), |
2028 (from_byte + outgoing_insbytes | 2017 (from_byte + outgoing_insbytes |
2248 /* Relocate point as if it were a marker. */ | 2237 /* Relocate point as if it were a marker. */ |
2249 if (from < PT) | 2238 if (from < PT) |
2250 adjust_point (from - (PT < to ? PT : to), | 2239 adjust_point (from - (PT < to ? PT : to), |
2251 from_byte - (PT_BYTE < to_byte ? PT_BYTE : to_byte)); | 2240 from_byte - (PT_BYTE < to_byte ? PT_BYTE : to_byte)); |
2252 | 2241 |
2253 /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */ | |
2254 offset_intervals (current_buffer, from, - nchars_del); | 2242 offset_intervals (current_buffer, from, - nchars_del); |
2255 | 2243 |
2256 /* Adjust the overlay center as needed. This must be done after | 2244 /* Adjust the overlay center as needed. This must be done after |
2257 adjusting the markers that bound the overlays. */ | 2245 adjusting the markers that bound the overlays. */ |
2258 adjust_overlays_for_delete (from, nchars_del); | 2246 adjust_overlays_for_delete (from, nchars_del); |
2350 /* Let redisplay consider other windows than selected_window | 2338 /* Let redisplay consider other windows than selected_window |
2351 if modifying another buffer. */ | 2339 if modifying another buffer. */ |
2352 if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer) | 2340 if (XBUFFER (XWINDOW (selected_window)->buffer) != current_buffer) |
2353 ++windows_or_buffers_changed; | 2341 ++windows_or_buffers_changed; |
2354 | 2342 |
2355 /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */ | |
2356 if (BUF_INTERVALS (current_buffer) != 0) | 2343 if (BUF_INTERVALS (current_buffer) != 0) |
2357 { | 2344 { |
2358 if (preserve_ptr) | 2345 if (preserve_ptr) |
2359 { | 2346 { |
2360 Lisp_Object preserve_marker; | 2347 Lisp_Object preserve_marker; |