diff options
author | Kenichi Handa <handa@m17n.org> | 1998-08-07 05:04:36 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 1998-08-07 05:04:36 +0000 |
commit | 38b62842a11aefbdb1cf572de04e5ee3d0957868 (patch) | |
tree | 7e372f80cb66fb47f98b906394d2482796bf5add /src/cmds.c | |
parent | e271fdb303e0dadc4b50210f3b998ebfca8990ba (diff) | |
download | emacs-38b62842a11aefbdb1cf572de04e5ee3d0957868.tar.gz |
(internal_self_insert): If enable-multibyte-characters is
nil, convert a multibyte character to unibyte appropriately.
Diffstat (limited to 'src/cmds.c')
-rw-r--r-- | src/cmds.c | 9 |
1 files 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) { |