373 |
if (! m->insertion_type) |
if (! m->insertion_type) |
374 |
/* Normal markers will end up at the beginning of the |
/* Normal markers will end up at the beginning of the |
375 |
re-inserted text after undoing a deletion, and must be |
re-inserted text after undoing a deletion, and must be |
376 |
adjusted to move them to the correct place. */ |
adjusted to move them to the correct place. */ |
377 |
record_marker_adjustment (marker, from - charpos); |
record_marker_adjustment (marker, from - charpos); |
378 |
else if (charpos < to) |
else if (charpos < to) |
379 |
/* Before-insertion markers will automatically move forward |
/* Before-insertion markers will automatically move forward |
536 |
That won't work because so many places use `int'. |
That won't work because so many places use `int'. |
537 |
|
|
538 |
Make sure we don't introduce overflows in the calculation. */ |
Make sure we don't introduce overflows in the calculation. */ |
539 |
|
|
540 |
if (Z_BYTE - BEG_BYTE + GAP_SIZE |
if (Z_BYTE - BEG_BYTE + GAP_SIZE |
541 |
>= (((EMACS_INT) 1 << (min (VALBITS, BITS_PER_INT) - 1)) - 1 |
>= (((EMACS_INT) 1 << (min (VALBITS, BITS_PER_INT) - 1)) - 1 |
542 |
- nbytes_added)) |
- nbytes_added)) |
990 |
{ |
{ |
991 |
if (nchars == 0) |
if (nchars == 0) |
992 |
return; |
return; |
993 |
|
|
994 |
if (NILP (current_buffer->enable_multibyte_characters)) |
if (NILP (current_buffer->enable_multibyte_characters)) |
995 |
nchars = nbytes; |
nchars = nbytes; |
996 |
|
|
1173 |
/* Get the intervals for the part of the string we are inserting. */ |
/* Get the intervals for the part of the string we are inserting. */ |
1174 |
if (nbytes < SBYTES (string)) |
if (nbytes < SBYTES (string)) |
1175 |
intervals = copy_intervals (intervals, pos, nchars); |
intervals = copy_intervals (intervals, pos, nchars); |
1176 |
|
|
1177 |
/* Insert those intervals. */ |
/* Insert those intervals. */ |
1178 |
graft_intervals_into_buffer (intervals, PT, nchars, |
graft_intervals_into_buffer (intervals, PT, nchars, |
1179 |
current_buffer, inherit); |
current_buffer, inherit); |
1239 |
|
|
1240 |
if (chunk < incoming_nbytes) |
if (chunk < incoming_nbytes) |
1241 |
outgoing_after_gap |
outgoing_after_gap |
1242 |
= count_size_as_multibyte (BUF_BYTE_ADDRESS (buf, |
= count_size_as_multibyte (BUF_BYTE_ADDRESS (buf, |
1243 |
from_byte + chunk), |
from_byte + chunk), |
1244 |
incoming_nbytes - chunk); |
incoming_nbytes - chunk); |
1245 |
|
|
1246 |
outgoing_nbytes = outgoing_before_gap + outgoing_after_gap; |
outgoing_nbytes = outgoing_before_gap + outgoing_after_gap; |
1247 |
} |
} |
1248 |
|
|
1249 |
/* Make sure point-max won't overflow after this insertion. */ |
/* Make sure point-max won't overflow after this insertion. */ |
1250 |
XSETINT (temp, outgoing_nbytes + Z); |
XSETINT (temp, outgoing_nbytes + Z); |
1251 |
if (outgoing_nbytes + Z != XINT (temp)) |
if (outgoing_nbytes + Z != XINT (temp)) |
1329 |
from += nchars; |
from += nchars; |
1330 |
intervals = copy_intervals (intervals, from, nchars); |
intervals = copy_intervals (intervals, from, nchars); |
1331 |
} |
} |
1332 |
|
|
1333 |
/* Insert those intervals. */ |
/* Insert those intervals. */ |
1334 |
graft_intervals_into_buffer (intervals, PT, nchars, current_buffer, inherit); |
graft_intervals_into_buffer (intervals, PT, nchars, current_buffer, inherit); |
1335 |
|
|
2129 |
return; |
return; |
2130 |
} |
} |
2131 |
|
|
2132 |
if (!NILP (combine_after_change_list)) |
if (!NILP (combine_after_change_list)) |
2133 |
Fcombine_after_change_execute (); |
Fcombine_after_change_execute (); |
2134 |
|
|
2135 |
if (!NILP (Vafter_change_functions)) |
if (!NILP (Vafter_change_functions)) |
2260 |
that was changed. */ |
that was changed. */ |
2261 |
begpos = BEG + beg; |
begpos = BEG + beg; |
2262 |
endpos = Z - end; |
endpos = Z - end; |
2263 |
|
|
2264 |
/* We are about to handle these, so discard them. */ |
/* We are about to handle these, so discard them. */ |
2265 |
combine_after_change_list = Qnil; |
combine_after_change_list = Qnil; |
2266 |
|
|