From: Kenichi Handa Date: Tue, 3 Sep 2002 04:08:14 +0000 (+0000) Subject: (internal_self_insert): In a multibyte buffer, insert C X-Git-Tag: emacs-pretest-23.0.90~8295^2~1864^2~383 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9ad8bfb0a0645b3bc9a7bf1298fa5f6808f4d8d5;p=emacs.git (internal_self_insert): In a multibyte buffer, insert C as is without converting it to unibyte. In a unibyte buffer, convert C to multibyte before checking the syntax. --- diff --git a/src/cmds.c b/src/cmds.c index 776e6b28083..21706d4ba80 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -360,7 +360,6 @@ internal_self_insert (c, noautofill) /* At first, get multi-byte form of C in STR. */ if (!NILP (current_buffer->enable_multibyte_characters)) { - c = unibyte_char_to_multibyte (c); len = CHAR_STRING (c, str); if (len == 1) /* If C has modifier bits, this makes C an appropriate @@ -437,10 +436,19 @@ internal_self_insert (c, noautofill) } hairy = 2; } + + if (NILP (current_buffer->enable_multibyte_characters)) + MAKE_CHAR_MULTIBYTE (c); + synt = SYNTAX (c); + if (!NILP (current_buffer->abbrev_mode) - && SYNTAX (c) != Sword + && synt != Sword && NILP (current_buffer->read_only) - && PT > BEGV && SYNTAX (XFASTINT (Fprevious_char ())) == Sword) + && PT > BEGV + && (!NILP (current_buffer->enable_multibyte_characters) + ? SYNTAX (XFASTINT (Fprevious_char ())) == Sword + : (SYNTAX (unibyte_char_to_multibyte (XFASTINT (Fprevious_char ()))) + == Sword))) { int modiff = MODIFF; Lisp_Object sym; @@ -508,7 +516,6 @@ internal_self_insert (c, noautofill) Vself_insert_face = Qnil; } - synt = SYNTAX (c); if ((synt == Sclose || synt == Smath) && !NILP (Vblink_paren_function) && INTERACTIVE && !noautofill)