diff options
author | Richard M. Stallman <rms@gnu.org> | 1998-02-12 05:19:41 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1998-02-12 05:19:41 +0000 |
commit | b34eda61110bcd5e5dbb72b29f7663d145ce0b81 (patch) | |
tree | a4482bba4a688664db68204ba22d947b92e028e7 /src | |
parent | 62b93feaeb8d2a620e62c34be9f49874b98ca531 (diff) | |
download | emacs-b34eda61110bcd5e5dbb72b29f7663d145ce0b81.tar.gz |
(copy_text, count_size_as_multibyte): Use Vnonascii_translate_table.
Diffstat (limited to 'src')
-rw-r--r-- | src/insdel.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/insdel.c b/src/insdel.c index 805200aae56..98d55e57d1f 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -594,7 +594,9 @@ copy_text (from_addr, to_addr, nbytes, 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 @@ count_size_as_multibyte (ptr, nbytes) 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; |