]> git.eshelyaron.com Git - emacs.git/commitdiff
(IT_write_glyphs): Move constant expression out of the loop.
authorEli Zaretskii <eliz@gnu.org>
Wed, 6 Jan 1999 10:08:24 +0000 (10:08 +0000)
committerEli Zaretskii <eliz@gnu.org>
Wed, 6 Jan 1999 10:08:24 +0000 (10:08 +0000)
src/msdos.c

index 9b70fbea74e888a6bee644ba64427514bed12a4e..7abe41a61242ce004b5cc490459cc4dd7e7b780a 100644 (file)
@@ -695,6 +695,12 @@ IT_write_glyphs (GLYPH *str, int str_len)
     ? &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 @@ IT_write_glyphs (GLYPH *str, int str_len)
          /* 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);