Mercurial > emacs
comparison src/insdel.c @ 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 | f9fafa0336af |
children | f77dcb2556c5 |
comparison
equal
deleted
inserted
replaced
20888:98172ad9f511 | 20889:454423099620 |
---|---|
592 unsigned char workbuf[4], *str; | 592 unsigned char workbuf[4], *str; |
593 int len; | 593 int len; |
594 | 594 |
595 if (c >= 0200 && c < 0400) | 595 if (c >= 0200 && c < 0400) |
596 { | 596 { |
597 if (nonascii_insert_offset > 0) | 597 if (! NILP (Vnonascii_translate_table)) |
598 c = XINT (Faref (Vnonascii_translate_table, make_number (c))); | |
599 else if (nonascii_insert_offset > 0) | |
598 c += nonascii_insert_offset; | 600 c += nonascii_insert_offset; |
599 else | 601 else |
600 c += DEFAULT_NONASCII_INSERT_OFFSET; | 602 c += DEFAULT_NONASCII_INSERT_OFFSET; |
601 | 603 |
602 len = CHAR_STRING (c, workbuf, str); | 604 len = CHAR_STRING (c, workbuf, str); |
627 for (i = 0; i < nbytes; i++) | 629 for (i = 0; i < nbytes; i++) |
628 { | 630 { |
629 unsigned int c = *ptr++; | 631 unsigned int c = *ptr++; |
630 if (c >= 0200 && c < 0400) | 632 if (c >= 0200 && c < 0400) |
631 { | 633 { |
632 if (nonascii_insert_offset > 0) | 634 if (! NILP (Vnonascii_translate_table)) |
635 c = XINT (Faref (Vnonascii_translate_table, make_number (c))); | |
636 else if (nonascii_insert_offset > 0) | |
633 c += nonascii_insert_offset; | 637 c += nonascii_insert_offset; |
634 else | 638 else |
635 c += DEFAULT_NONASCII_INSERT_OFFSET; | 639 c += DEFAULT_NONASCII_INSERT_OFFSET; |
636 } | 640 } |
637 outgoing_nbytes += XINT (Fchar_bytes (make_number (c))); | 641 outgoing_nbytes += XINT (Fchar_bytes (make_number (c))); |