From 38b62842a11aefbdb1cf572de04e5ee3d0957868 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 7 Aug 1998 05:04:36 +0000 Subject: [PATCH] (internal_self_insert): If enable-multibyte-characters is nil, convert a multibyte character to unibyte appropriately. --- src/cmds.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/cmds.c b/src/cmds.c index f91f91b0bc1..f705f147727 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -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) { -- 2.39.2