From: Gerd Moellmann Date: Thu, 14 Sep 2000 15:13:29 +0000 (+0000) Subject: (make_gap): Use enlarge_buffer_text. X-Git-Tag: emacs-pretest-21.0.90~1619 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=71a7bfa7ee076eca9de5ed9ca737e06fcf7c4bec;p=emacs.git (make_gap): Use enlarge_buffer_text. --- 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) >= ((unsigned) 1 << (min (BITS_PER_INT, VALBITS) - 1))) error ("Buffer exceeds maximum size"); - BLOCK_INPUT; - /* We allocate extra 1-byte `\0' at the tail for anchoring a search. */ - result = BUFFER_REALLOC (BEG_ADDR, (Z_BYTE - BEG_BYTE - + GAP_SIZE + nbytes_added + 1)); - - if (result == 0) - { - UNBLOCK_INPUT; - memory_full (); - } - - /* We can't unblock until the new address is properly stored. */ - BEG_ADDR = result; - UNBLOCK_INPUT; + enlarge_buffer_text (current_buffer, nbytes_added); /* Prevent quitting in move_gap. */ tem = Vinhibit_quit;