From: Kenichi Handa Date: Thu, 27 Aug 2009 06:02:17 +0000 (+0000) Subject: (Fself_insert_command): Avoid unnecessay unibyte->multibyte X-Git-Tag: emacs-pretest-23.1.90~1664 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ef73e7be7be86d7fed6b2c990fc278622162668d;p=emacs.git (Fself_insert_command): Avoid unnecessay unibyte->multibyte conversion. --- diff --git a/src/ChangeLog b/src/ChangeLog index 8fd6875edaa..b14fac9b6b1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-08-27 Kenichi Handa + + * cmds.c (Fself_insert_command): Avoid unnecessay + unibyte->multibyte conversion. + 2009-08-26 Dan Nicolaescu * callproc.c (Fcall_process): Remove always true #if. @@ -32,6 +37,9 @@ 2009-08-25 Kenichi Handa + * alloc.c (mark_char_table): New function. + (mark_object): Use mark_char_table for a char-table. + * lisp.h (CHAR_TABLE_REF_ASCII): New macro. (CHAR_TABLE_REF): Use it. diff --git a/src/cmds.c b/src/cmds.c index c66db7a3f11..c348bed99a6 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -360,20 +360,13 @@ After insertion, the value of `auto-fill-function' is called if the XINT (last_command_event)); if (XINT (n) >= 2 && NILP (current_buffer->overwrite_mode)) { - int modified_char = character; - /* Add the offset to the character, for Finsert_char. - We pass internal_self_insert the unmodified character - because it itself does this offsetting. */ - if (! NILP (current_buffer->enable_multibyte_characters)) - modified_char = unibyte_char_to_multibyte (modified_char); - XSETFASTINT (n, XFASTINT (n) - 2); /* The first one might want to expand an abbrev. */ internal_self_insert (character, 1); /* The bulk of the copies of this char can be inserted simply. We don't have to handle a user-specified face specially because it will get inherited from the first char inserted. */ - Finsert_char (make_number (modified_char), n, Qt); + Finsert_char (make_number (character), n, Qt); /* The last one might want to auto-fill. */ internal_self_insert (character, 0); }