/* 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.
{
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;
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 ();