]> code.delx.au - gnu-emacs/commitdiff
(copy_text): If Vnonascii_translation_table is non-nil, try
authorKenichi Handa <handa@m17n.org>
Mon, 31 Aug 1998 03:50:17 +0000 (03:50 +0000)
committerKenichi Handa <handa@m17n.org>
Mon, 31 Aug 1998 03:50:17 +0000 (03:50 +0000)
to convert a character less than 160 to multibyte.
(count_size_as_multibyte): Likewise.

src/insdel.c

index 2faa53ee174d57a3fbcd7b9855bf936e2f3e3796..fb29518fe89563d6d7e7bf4d21c384df8dae99c3 100644 (file)
@@ -736,7 +736,7 @@ copy_text (from_addr, to_addr, nbytes,
          unsigned char workbuf[4], *str;
          int len;
 
-         if (c >= 0240 && c < 0400)
+         if ((c >= 0240 || !NILP (Vnonascii_translation_table)) && c < 0400)
            {
              c = unibyte_char_to_multibyte (c);
              len = CHAR_STRING (c, workbuf, str);
@@ -768,7 +768,7 @@ count_size_as_multibyte (ptr, nbytes)
     {
       unsigned int c = *ptr++;
 
-      if (c < 0240)
+      if (c < 0240 && NILP (Vnonascii_translation_table))
        outgoing_nbytes++;
       else
        {