From: Andreas Schwab Date: Sun, 22 Feb 2009 14:29:25 +0000 (+0000) Subject: (del_range_2): Don't modify gap contents when called X-Git-Tag: emacs-pretest-23.0.91~80 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b3b58c01900f2c028f00d4aa8d432cdc53f072be;p=emacs.git (del_range_2): Don't modify gap contents when called from decode_coding_object. (Bug#1809) --- diff --git a/src/ChangeLog b/src/ChangeLog index d53b29bbffb..0e75c26a763 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-02-22 Andreas Schwab + + * insdel.c (del_range_2): Don't modify gap contents when called + from decode_coding_object. (Bug#1809) + 2009-02-21 Chong Yidong * data.c (syms_of_data): Define Qfont_spec, Qfont_entity, and diff --git a/src/insdel.c b/src/insdel.c index d8e9e99d55a..814d1571d39 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -2006,7 +2006,10 @@ del_range_2 (from, from_byte, to, to_byte, ret_string) Z -= nchars_del; GPT = from; GPT_BYTE = from_byte; - if (GAP_SIZE > 0) *(GPT_ADDR) = 0; /* Put an anchor. */ + if (GAP_SIZE > 0 && !current_buffer->text->inhibit_shrinking) + /* Put an anchor, unless called from decode_coding_object which + needs to access the previous gap contents. */ + *(GPT_ADDR) = 0; if (GPT_BYTE < GPT) abort ();