diff options
| author | Gerd Moellmann | 2000-09-14 15:13:29 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-09-14 15:13:29 +0000 |
| commit | 71a7bfa7ee076eca9de5ed9ca737e06fcf7c4bec (patch) | |
| tree | 3b677ca84c87202dd6f845b310aac06b888b78f7 | |
| parent | a74c5ec1a49164cddf46a12482afa7359251770f (diff) | |
| download | emacs-71a7bfa7ee076eca9de5ed9ca737e06fcf7c4bec.tar.gz emacs-71a7bfa7ee076eca9de5ed9ca737e06fcf7c4bec.zip | |
(make_gap): Use enlarge_buffer_text.
| -rw-r--r-- | src/insdel.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/insdel.c b/src/insdel.c index b62fba5b8b9..acc1d47395d 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -520,20 +520,7 @@ make_gap (nbytes_added) | |||
| 520 | >= ((unsigned) 1 << (min (BITS_PER_INT, VALBITS) - 1))) | 520 | >= ((unsigned) 1 << (min (BITS_PER_INT, VALBITS) - 1))) |
| 521 | error ("Buffer exceeds maximum size"); | 521 | error ("Buffer exceeds maximum size"); |
| 522 | 522 | ||
| 523 | BLOCK_INPUT; | 523 | enlarge_buffer_text (current_buffer, nbytes_added); |
| 524 | /* We allocate extra 1-byte `\0' at the tail for anchoring a search. */ | ||
| 525 | result = BUFFER_REALLOC (BEG_ADDR, (Z_BYTE - BEG_BYTE | ||
| 526 | + GAP_SIZE + nbytes_added + 1)); | ||
| 527 | |||
| 528 | if (result == 0) | ||
| 529 | { | ||
| 530 | UNBLOCK_INPUT; | ||
| 531 | memory_full (); | ||
| 532 | } | ||
| 533 | |||
| 534 | /* We can't unblock until the new address is properly stored. */ | ||
| 535 | BEG_ADDR = result; | ||
| 536 | UNBLOCK_INPUT; | ||
| 537 | 524 | ||
| 538 | /* Prevent quitting in move_gap. */ | 525 | /* Prevent quitting in move_gap. */ |
| 539 | tem = Vinhibit_quit; | 526 | tem = Vinhibit_quit; |