changeset 21032:3bf522f06501

(internal_self_insert): Avoid checking enable-multibyte-characters twice.
author Kenichi Handa <handa@m17n.org>
date Tue, 03 Mar 1998 01:29:16 +0000
parents 7352e0598efa
children 9f32198e0d9f
files src/cmds.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/cmds.c	Tue Mar 03 01:29:16 1998 +0000
+++ b/src/cmds.c	Tue Mar 03 01:29:16 1998 +0000
@@ -342,9 +342,6 @@
   int chars_to_delete = 0;
   int spaces_to_insert = 0;
 
-  if (! NILP (current_buffer->enable_multibyte_characters))
-    c = unibyte_char_to_multibyte (c);
-
   overwrite = current_buffer->overwrite_mode;
   if (!NILP (Vbefore_change_function) || !NILP (Vafter_change_function)
       || !NILP (Vbefore_change_functions) || !NILP (Vafter_change_functions))
@@ -352,7 +349,10 @@
 
   /* At first, get multi-byte form of C in STR.  */
   if (!NILP (current_buffer->enable_multibyte_characters))
-    len = CHAR_STRING (c, workbuf, str);
+    {
+      c = unibyte_char_to_multibyte (c);
+      len = CHAR_STRING (c, workbuf, str);
+    }
   else
     workbuf[0] = c, str = workbuf, len = 1;