diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 2 | ||||
| -rw-r--r-- | src/insdel.c | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b2a4845c336..c6418ddcfac 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * editfns.c (Fbuffer_size): Rename from Fbufsize to fit the common | 6 | * editfns.c (Fbuffer_size): Rename from Fbufsize to fit the common |
| 7 | naming convention. | 7 | naming convention. |
| 8 | (syms_of_editfns): Adjust defsubr. Drop commented-out obsolete code. | 8 | (syms_of_editfns): Adjust defsubr. Drop commented-out obsolete code. |
| 9 | * insdel.c (make_gap_larger): Use GAP_BYTES_DFL. | 9 | * insdel.c (make_gap_larger): Use GAP_BYTES_DFL. Adjust comment. |
| 10 | (make_gap_smaller): Use GAP_BYTES_MIN. Adjust comment. | 10 | (make_gap_smaller): Use GAP_BYTES_MIN. Adjust comment. |
| 11 | (make_gap_1): New function to adjust the gap of any buffer. | 11 | (make_gap_1): New function to adjust the gap of any buffer. |
| 12 | * coding.c (coding_alloc_by_making_gap): Use it. | 12 | * coding.c (coding_alloc_by_making_gap): Use it. |
diff --git a/src/insdel.c b/src/insdel.c index 68b3eddb30b..905249d6714 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -412,8 +412,7 @@ make_gap_larger (ptrdiff_t nbytes_added) | |||
| 412 | GPT_BYTE = Z_BYTE + GAP_SIZE; | 412 | GPT_BYTE = Z_BYTE + GAP_SIZE; |
| 413 | GAP_SIZE = nbytes_added; | 413 | GAP_SIZE = nbytes_added; |
| 414 | 414 | ||
| 415 | /* Move the new gap down to be consecutive with the end of the old one. | 415 | /* Move the new gap down to be consecutive with the end of the old one. */ |
| 416 | This adjusts the markers properly too. */ | ||
| 417 | gap_left (real_gap_loc + old_gap_size, real_gap_loc_byte + old_gap_size, 1); | 416 | gap_left (real_gap_loc + old_gap_size, real_gap_loc_byte + old_gap_size, 1); |
| 418 | 417 | ||
| 419 | /* Now combine the two into one large gap. */ | 418 | /* Now combine the two into one large gap. */ |
| @@ -467,8 +466,7 @@ make_gap_smaller (ptrdiff_t nbytes_removed) | |||
| 467 | Z_BYTE += new_gap_size; | 466 | Z_BYTE += new_gap_size; |
| 468 | GAP_SIZE = nbytes_removed; | 467 | GAP_SIZE = nbytes_removed; |
| 469 | 468 | ||
| 470 | /* Move the unwanted pretend gap to the end of the buffer. This | 469 | /* Move the unwanted pretend gap to the end of the buffer. */ |
| 471 | adjusts the markers properly too. */ | ||
| 472 | gap_right (Z, Z_BYTE); | 470 | gap_right (Z, Z_BYTE); |
| 473 | 471 | ||
| 474 | enlarge_buffer_text (current_buffer, -nbytes_removed); | 472 | enlarge_buffer_text (current_buffer, -nbytes_removed); |