Mercurial > emacs
changeset 22929:6dda0a4b882f
(general_insert_function): If enable-multibyte-characters is
nil, convert a multibyte character to unibyte appropriately.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 07 Aug 1998 05:04:36 +0000 |
parents | db3229678ef9 |
children | 72582ab5369d |
files | src/editfns.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/editfns.c Fri Aug 07 05:04:36 1998 +0000 +++ b/src/editfns.c Fri Aug 07 05:04:36 1998 +0000 @@ -1326,7 +1326,13 @@ 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))