From: Kenichi Handa Date: Fri, 7 Aug 1998 05:04:36 +0000 (+0000) Subject: (general_insert_function): If enable-multibyte-characters is X-Git-Tag: emacs-20.3~150 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=13c148b8e78d1ab7570f947d845c5bcb2c72e244;p=emacs.git (general_insert_function): If enable-multibyte-characters is nil, convert a multibyte character to unibyte appropriately. --- diff --git a/src/editfns.c b/src/editfns.c index c3cdad96aa0..fcf79d13431 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -1326,7 +1326,13 @@ general_insert_function (insert_func, insert_from_string_func, if (!NILP (current_buffer->enable_multibyte_characters)) len = CHAR_STRING (XFASTINT (val), workbuf, str); else - workbuf[0] = XINT (val), str = workbuf, len = 1; + { + workbuf[0] = (SINGLE_BYTE_CHAR_P (XINT (val)) + ? XINT (val) + : multibyte_char_to_unibyte (XINT (val), Qnil)); + str = workbuf; + len = 1; + } (*insert_func) (str, len); } else if (STRINGP (val))