* nsfns.m (ns_appkit_version_int): Fix typo in the version macro.
[bpt/emacs.git] / src / insdel.c
index a41f03b..814d157 100644 (file)
@@ -1,6 +1,6 @@
 /* Buffer insertion/deletion and gap motion for GNU Emacs.
    Copyright (C) 1985, 1986, 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001,
-                 2002, 2003, 2004, 2005, 2006, 2007, 2008
+                 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
                  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -655,8 +655,8 @@ copy_text (from_addr, to_addr, nbytes,
        {
          int thislen, c;
          c = STRING_CHAR_AND_LENGTH (from_addr, bytes_left, thislen);
-         if (!ASCII_CHAR_P (c))
-           c = multibyte_char_to_unibyte (c, tbl);
+         if (! ASCII_CHAR_P (c))
+           c &= 0xFF;
          *to_addr++ = c;
          from_addr += thislen;
          bytes_left -= thislen;
@@ -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 ();