changeset 24001:fce0e760c4ab

(IT_write_glyphs): Move constant expression out of the loop.
author Eli Zaretskii <eliz@gnu.org>
date Wed, 06 Jan 1999 10:08:24 +0000
parents 2de7db40964d
children c6bfff41f2b5
files src/msdos.c
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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);