From eefd727851555237c7bc205b7ad255c50ba3fff9 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Wed, 9 Jan 2013 17:50:22 +0400 Subject: * lisp.h (make_gap_1): New prototype. * buffer.h (GAP_BYTES_DFL, GAP_BYTES_MIN): New macros for the special gap size values. * editfns.c (Fbuffer_size): Rename from Fbufsize to fit the common naming convention. (syms_of_editfns): Adjust defsubr. Drop commented-out obsolete code. * insdel.c (make_gap_larger): Use GAP_BYTES_DFL. (make_gap_smaller): Use GAP_BYTES_MIN. Adjust comment. (make_gap_1): New function to adjust the gap of any buffer. * coding.c (coding_alloc_by_making_gap): Use it. * buffer.c (compact_buffer): Likewise. Use BUF_Z_BYTE, BUF_GAP_SIZE, GAP_BYTES_DFL and GAP_BYTES_MIN. Adjust comment. --- src/coding.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/coding.c') diff --git a/src/coding.c b/src/coding.c index 5285a906823..a9bf9032a69 100644 --- a/src/coding.c +++ b/src/coding.c @@ -1049,14 +1049,7 @@ coding_alloc_by_making_gap (struct coding_system *coding, GPT -= gap_head_used, GPT_BYTE -= gap_head_used; } else - { - Lisp_Object this_buffer; - - this_buffer = Fcurrent_buffer (); - set_buffer_internal (XBUFFER (coding->dst_object)); - make_gap (bytes); - set_buffer_internal (XBUFFER (this_buffer)); - } + make_gap_1 (XBUFFER (coding->dst_object), bytes); } -- cgit v1.2.1