Mercurial > emacs
comparison src/xterm.c @ 38280:f546577bb4e9
(x_produce_glyphs): Don't convert multibyte characters
to unibyte characters in unibyte buffers.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Wed, 04 Jul 2001 07:42:17 +0000 |
parents | 9ec233999747 |
children | 293a8b219972 |
comparison
equal
deleted
inserted
replaced
38279:1ded478b3fda | 38280:f546577bb4e9 |
---|---|
1815 | 1815 |
1816 Note: It seems that we don't have to record multibyte_p in | 1816 Note: It seems that we don't have to record multibyte_p in |
1817 struct glyph because the character code itself tells if or | 1817 struct glyph because the character code itself tells if or |
1818 not the character is multibyte. Thus, in the future, we must | 1818 not the character is multibyte. Thus, in the future, we must |
1819 consider eliminating the field `multibyte_p' in the struct | 1819 consider eliminating the field `multibyte_p' in the struct |
1820 glyph. | 1820 glyph. */ |
1821 */ | |
1822 int saved_multibyte_p = it->multibyte_p; | 1821 int saved_multibyte_p = it->multibyte_p; |
1823 | 1822 |
1824 /* Maybe translate single-byte characters to multibyte, or the | 1823 /* Maybe translate single-byte characters to multibyte, or the |
1825 other way. */ | 1824 other way. */ |
1826 it->char_to_display = it->c; | 1825 it->char_to_display = it->c; |
1837 face = FACE_FROM_ID (it->f, it->face_id); | 1836 face = FACE_FROM_ID (it->f, it->face_id); |
1838 } | 1837 } |
1839 else if (!SINGLE_BYTE_CHAR_P (it->c) | 1838 else if (!SINGLE_BYTE_CHAR_P (it->c) |
1840 && !it->multibyte_p) | 1839 && !it->multibyte_p) |
1841 { | 1840 { |
1842 it->char_to_display = multibyte_char_to_unibyte (it->c, Qnil); | 1841 it->multibyte_p = 1; |
1843 it->multibyte_p = 0; | |
1844 it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display); | 1842 it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display); |
1845 face = FACE_FROM_ID (it->f, it->face_id); | 1843 face = FACE_FROM_ID (it->f, it->face_id); |
1846 } | 1844 } |
1847 } | 1845 } |
1848 | 1846 |