]> git.eshelyaron.com Git - emacs.git/commitdiff
(del_range_2): Don't modify gap contents when called
authorAndreas Schwab <schwab@suse.de>
Sun, 22 Feb 2009 14:29:25 +0000 (14:29 +0000)
committerAndreas Schwab <schwab@suse.de>
Sun, 22 Feb 2009 14:29:25 +0000 (14:29 +0000)
from decode_coding_object.  (Bug#1809)

src/ChangeLog
src/insdel.c

index d53b29bbffb85dac11bc434840a21ec92e9d6581..0e75c26a7636b9fc09aae72e39d9e279f01f399c 100644 (file)
@@ -1,3 +1,8 @@
+2009-02-22  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * insdel.c (del_range_2): Don't modify gap contents when called
+       from decode_coding_object.  (Bug#1809)
+
 2009-02-21  Chong Yidong  <cyd@stupidchicken.com>
 
        * data.c (syms_of_data): Define Qfont_spec, Qfont_entity, and
index d8e9e99d55a0344477218bc4a6b9a19766b6fc68..814d1571d3954d34c07cfbdd31bea6c836c94e7e 100644 (file)
@@ -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 ();