aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmds.c
diff options
context:
space:
mode:
authorKenichi Handa2009-08-27 06:02:17 +0000
committerKenichi Handa2009-08-27 06:02:17 +0000
commitef73e7be7be86d7fed6b2c990fc278622162668d (patch)
treedda7a805e4b8ecc596b212b70f89d08ba6e65757 /src/cmds.c
parentd3192c8fd7d6a89d77ff5a27656fe1a6b44374ef (diff)
downloademacs-ef73e7be7be86d7fed6b2c990fc278622162668d.tar.gz
emacs-ef73e7be7be86d7fed6b2c990fc278622162668d.zip
(Fself_insert_command): Avoid unnecessay unibyte->multibyte
conversion.
Diffstat (limited to 'src/cmds.c')
-rw-r--r--src/cmds.c9
1 files changed, 1 insertions, 8 deletions
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
360 XINT (last_command_event)); 360 XINT (last_command_event));
361 if (XINT (n) >= 2 && NILP (current_buffer->overwrite_mode)) 361 if (XINT (n) >= 2 && NILP (current_buffer->overwrite_mode))
362 { 362 {
363 int modified_char = character;
364 /* Add the offset to the character, for Finsert_char.
365 We pass internal_self_insert the unmodified character
366 because it itself does this offsetting. */
367 if (! NILP (current_buffer->enable_multibyte_characters))
368 modified_char = unibyte_char_to_multibyte (modified_char);
369
370 XSETFASTINT (n, XFASTINT (n) - 2); 363 XSETFASTINT (n, XFASTINT (n) - 2);
371 /* The first one might want to expand an abbrev. */ 364 /* The first one might want to expand an abbrev. */
372 internal_self_insert (character, 1); 365 internal_self_insert (character, 1);
373 /* The bulk of the copies of this char can be inserted simply. 366 /* The bulk of the copies of this char can be inserted simply.
374 We don't have to handle a user-specified face specially 367 We don't have to handle a user-specified face specially
375 because it will get inherited from the first char inserted. */ 368 because it will get inherited from the first char inserted. */
376 Finsert_char (make_number (modified_char), n, Qt); 369 Finsert_char (make_number (character), n, Qt);
377 /* The last one might want to auto-fill. */ 370 /* The last one might want to auto-fill. */
378 internal_self_insert (character, 0); 371 internal_self_insert (character, 0);
379 } 372 }