[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/editfns.c,v
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/src/editfns.c,v |
Date: |
Sat, 24 Mar 2007 15:50:21 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 07/03/24 15:50:21
Index: editfns.c
===================================================================
RCS file: /sources/emacs/emacs/src/editfns.c,v
retrieving revision 1.436
retrieving revision 1.437
diff -u -b -r1.436 -r1.437
--- editfns.c 17 Mar 2007 19:00:52 -0000 1.436
+++ editfns.c 24 Mar 2007 15:50:21 -0000 1.437
@@ -4118,6 +4118,9 @@
unsigned char *start1_addr, *start2_addr, *temp;
INTERVAL cur_intv, tmp_interval1, tmp_interval_mid, tmp_interval2;
+ Lisp_Object buf;
+
+ XSETBUFFER (buf, current_buffer);
cur_intv = BUF_INTERVALS (current_buffer);
validate_region (&startr1, &endr1);
@@ -4224,8 +4227,10 @@
tmp_interval1 = copy_intervals (cur_intv, start1, len1);
tmp_interval2 = copy_intervals (cur_intv, start2, len2);
- Fset_text_properties (make_number (start1), make_number (end2),
- Qnil, Qnil);
+ /* Don't use Fset_text_properties: that can cause GC, which can
+ clobber objects stored in the tmp_intervals. */
+ set_text_properties_1 (make_number (start1), make_number (end2),
+ Qnil, buf, NULL);
/* First region smaller than second. */
if (len1_byte < len2_byte)
@@ -4281,10 +4286,10 @@
record_change (start2, len2);
tmp_interval1 = copy_intervals (cur_intv, start1, len1);
tmp_interval2 = copy_intervals (cur_intv, start2, len2);
- Fset_text_properties (make_number (start1), make_number (end1),
- Qnil, Qnil);
- Fset_text_properties (make_number (start2), make_number (end2),
- Qnil, Qnil);
+ set_text_properties_1 (make_number (start1), make_number (end1),
+ Qnil, buf, NULL);
+ set_text_properties_1 (make_number (start2), make_number (end2),
+ Qnil, buf, NULL);
SAFE_ALLOCA (temp, unsigned char *, len1_byte);
start1_addr = BYTE_POS_ADDR (start1_byte);
@@ -4310,8 +4315,8 @@
tmp_interval1 = copy_intervals (cur_intv, start1, len1);
tmp_interval_mid = copy_intervals (cur_intv, end1, len_mid);
tmp_interval2 = copy_intervals (cur_intv, start2, len2);
- Fset_text_properties (make_number (start1), make_number (end2),
- Qnil, Qnil);
+ set_text_properties_1 (make_number (start1), make_number (end2),
+ Qnil, buf, NULL);
/* holds region 2 */
SAFE_ALLOCA (temp, unsigned char *, len2_byte);
@@ -4341,8 +4346,8 @@
tmp_interval1 = copy_intervals (cur_intv, start1, len1);
tmp_interval_mid = copy_intervals (cur_intv, end1, len_mid);
tmp_interval2 = copy_intervals (cur_intv, start2, len2);
- Fset_text_properties (make_number (start1), make_number (end2),
- Qnil, Qnil);
+ set_text_properties_1 (make_number (start1), make_number (end2),
+ Qnil, buf, NULL);
/* holds region 1 */
SAFE_ALLOCA (temp, unsigned char *, len1_byte);
@@ -4377,6 +4382,8 @@
fix_start_end_in_overlays (start1, end2);
}
+ signal_after_change (XINT (start1), XINT (end2 - start1),
+ XINT (end2 - start1));
return Qnil;
}
- [Emacs-diffs] Changes to emacs/src/editfns.c,v, Glenn Morris, 2007/03/11
- [Emacs-diffs] Changes to emacs/src/editfns.c,v, Chong Yidong, 2007/03/17
- [Emacs-diffs] Changes to emacs/src/editfns.c,v, Chong Yidong, 2007/03/17
- [Emacs-diffs] Changes to emacs/src/editfns.c,v,
Chong Yidong <=
- [Emacs-diffs] Changes to emacs/src/editfns.c,v, Eli Zaretskii, 2007/03/24