1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-11 16:08:13 +00:00

(general_insert_function): If enable-multibyte-characters is

nil, convert a multibyte character to unibyte appropriately.
This commit is contained in:
Kenichi Handa 1998-08-07 05:04:36 +00:00
parent 5666cc6f95
commit 13c148b8e7

View File

@ -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))