]> git.eshelyaron.com Git - emacs.git/commitdiff
(internal_self_insert): If enable-multibyte-characters is
authorKenichi Handa <handa@m17n.org>
Fri, 7 Aug 1998 05:04:36 +0000 (05:04 +0000)
committerKenichi Handa <handa@m17n.org>
Fri, 7 Aug 1998 05:04:36 +0000 (05:04 +0000)
nil, convert a multibyte character to unibyte appropriately.

src/cmds.c

index f91f91b0bc165eb3ab0afb79dfdd6c7259b3efaa..f705f14772724d0add9e071a1076bf2b732f23f2 100644 (file)
@@ -356,8 +356,13 @@ internal_self_insert (c, noautofill)
       len = CHAR_STRING (c, workbuf, str);
     }
   else
-    workbuf[0] = c, str = workbuf, len = 1;
-
+    {
+      workbuf[0] = (SINGLE_BYTE_CHAR_P (c)
+                   ? c
+                   : multibyte_char_to_unibyte (c, Qnil));
+      str = workbuf;
+      len = 1;
+    }
   if (!NILP (overwrite)
       && PT < ZV)
     {