# HG changeset patch # User Eli Zaretskii # Date 915617304 0 # Node ID fce0e760c4ab957c9cb4f883f6c8f6b9d47e28a0 # Parent 2de7db40964de3d8fc2b2bb5834a3fbe83195ea9 (IT_write_glyphs): Move constant expression out of the loop. diff -r 2de7db40964d -r fce0e760c4ab src/msdos.c --- a/src/msdos.c Wed Jan 06 10:05:50 1999 +0000 +++ b/src/msdos.c Wed Jan 06 10:08:24 1999 +0000 @@ -695,6 +695,12 @@ ? &terminal_coding : &safe_terminal_coding; + /* Do we need to consider conversion of unibyte characters to + multibyte? */ + int convert_unibyte_characters + = NILP (current_buffer->enable_multibyte_characters) + && unibyte_display_via_language_environment; + if (str_len == 0) return; screen_buf = screen_bp = alloca (str_len * 2); @@ -729,9 +735,7 @@ /* We only want to convert unibyte characters to multibyte in unibyte buffers! Otherwise, the 8-bit code might come from the display table set up to display foreign characters. */ - if (NILP (current_buffer->enable_multibyte_characters) - && unibyte_display_via_language_environment - && SINGLE_BYTE_CHAR_P (ch) + if (SINGLE_BYTE_CHAR_P (ch) && convert_unibyte_characters && (ch >= 0240 || (ch >= 0200 && !NILP (Vnonascii_translation_table)))) ch = unibyte_char_to_multibyte (ch);