changeset 20889:454423099620

(copy_text, count_size_as_multibyte): Use Vnonascii_translate_table.
author Richard M. Stallman <rms@gnu.org>
date Thu, 12 Feb 1998 05:19:41 +0000
parents 98172ad9f511
children c7cfd531cf2b
files src/insdel.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/insdel.c	Thu Feb 12 05:18:59 1998 +0000
+++ b/src/insdel.c	Thu Feb 12 05:19:41 1998 +0000
@@ -594,7 +594,9 @@
 
 	  if (c >= 0200 && c < 0400)
 	    {
-	      if (nonascii_insert_offset > 0)
+	      if (! NILP (Vnonascii_translate_table))
+		c = XINT (Faref (Vnonascii_translate_table, make_number (c)));
+	      else if (nonascii_insert_offset > 0)
 		c += nonascii_insert_offset;
 	      else
 		c += DEFAULT_NONASCII_INSERT_OFFSET;
@@ -629,7 +631,9 @@
       unsigned int c = *ptr++;
       if (c >= 0200 && c < 0400)
 	{
-	  if (nonascii_insert_offset > 0)
+	  if (! NILP (Vnonascii_translate_table))
+	    c = XINT (Faref (Vnonascii_translate_table, make_number (c)));
+	  else if (nonascii_insert_offset > 0)
 	    c += nonascii_insert_offset;
 	  else
 	    c += DEFAULT_NONASCII_INSERT_OFFSET;