diff options
| author | Kenichi Handa | 2000-10-12 05:22:46 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2000-10-12 05:22:46 +0000 |
| commit | a4249304d84bb8d27071501c2c9a35e550d01c68 (patch) | |
| tree | 9061d53c58d8928566071061d8aebe1f052876d5 /src | |
| parent | 8a0eba09cf7eef32296d1517df4a457903fd8739 (diff) | |
| download | emacs-a4249304d84bb8d27071501c2c9a35e550d01c68.tar.gz emacs-a4249304d84bb8d27071501c2c9a35e550d01c68.zip | |
(x_produce_glyphs): Handle unibyte_display_via_language_environment
correctly.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/xterm.c b/src/xterm.c index ff821edab19..ef707abfcfe 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -1798,6 +1798,17 @@ x_produce_glyphs (it) | |||
| 1798 | int font_not_found_p; | 1798 | int font_not_found_p; |
| 1799 | struct font_info *font_info; | 1799 | struct font_info *font_info; |
| 1800 | int boff; /* baseline offset */ | 1800 | int boff; /* baseline offset */ |
| 1801 | /* We may change it->multibyte_p upon unibyte<->multibyte | ||
| 1802 | conversion. So, save the current value now and restore it | ||
| 1803 | later. | ||
| 1804 | |||
| 1805 | Note: It seems that we don't have to record multibyte_p in | ||
| 1806 | struct glyph because the character code itself tells if or | ||
| 1807 | not the character is multibyte. Thus, in the future, we must | ||
| 1808 | consider eliminating the field `multibyte_p' in the struct | ||
| 1809 | glyph. | ||
| 1810 | */ | ||
| 1811 | int saved_multibyte_p = it->multibyte_p; | ||
| 1801 | 1812 | ||
| 1802 | /* Maybe translate single-byte characters to multibyte, or the | 1813 | /* Maybe translate single-byte characters to multibyte, or the |
| 1803 | other way. */ | 1814 | other way. */ |
| @@ -1810,6 +1821,7 @@ x_produce_glyphs (it) | |||
| 1810 | || !NILP (Vnonascii_translation_table))) | 1821 | || !NILP (Vnonascii_translation_table))) |
| 1811 | { | 1822 | { |
| 1812 | it->char_to_display = unibyte_char_to_multibyte (it->c); | 1823 | it->char_to_display = unibyte_char_to_multibyte (it->c); |
| 1824 | it->multibyte_p = 1; | ||
| 1813 | it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display); | 1825 | it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display); |
| 1814 | face = FACE_FROM_ID (it->f, it->face_id); | 1826 | face = FACE_FROM_ID (it->f, it->face_id); |
| 1815 | } | 1827 | } |
| @@ -1817,6 +1829,7 @@ x_produce_glyphs (it) | |||
| 1817 | && !it->multibyte_p) | 1829 | && !it->multibyte_p) |
| 1818 | { | 1830 | { |
| 1819 | it->char_to_display = multibyte_char_to_unibyte (it->c, Qnil); | 1831 | it->char_to_display = multibyte_char_to_unibyte (it->c, Qnil); |
| 1832 | it->multibyte_p = 0; | ||
| 1820 | it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display); | 1833 | it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display); |
| 1821 | face = FACE_FROM_ID (it->f, it->face_id); | 1834 | face = FACE_FROM_ID (it->f, it->face_id); |
| 1822 | } | 1835 | } |
| @@ -2016,6 +2029,7 @@ x_produce_glyphs (it) | |||
| 2016 | if (it->glyph_row) | 2029 | if (it->glyph_row) |
| 2017 | x_append_glyph (it); | 2030 | x_append_glyph (it); |
| 2018 | } | 2031 | } |
| 2032 | it->multibyte_p = saved_multibyte_p; | ||
| 2019 | } | 2033 | } |
| 2020 | else if (it->what == IT_COMPOSITION) | 2034 | else if (it->what == IT_COMPOSITION) |
| 2021 | { | 2035 | { |