aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2009-08-27 06:02:17 +0000
committerKenichi Handa2009-08-27 06:02:17 +0000
commitef73e7be7be86d7fed6b2c990fc278622162668d (patch)
treedda7a805e4b8ecc596b212b70f89d08ba6e65757
parentd3192c8fd7d6a89d77ff5a27656fe1a6b44374ef (diff)
downloademacs-ef73e7be7be86d7fed6b2c990fc278622162668d.tar.gz
emacs-ef73e7be7be86d7fed6b2c990fc278622162668d.zip
(Fself_insert_command): Avoid unnecessay unibyte->multibyte
conversion.
-rw-r--r--src/ChangeLog8
-rw-r--r--src/cmds.c9
2 files changed, 9 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 8fd6875edaa..b14fac9b6b1 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12009-08-27 Kenichi Handa <handa@m17n.org>
2
3 * cmds.c (Fself_insert_command): Avoid unnecessay
4 unibyte->multibyte conversion.
5
12009-08-26 Dan Nicolaescu <dann@ics.uci.edu> 62009-08-26 Dan Nicolaescu <dann@ics.uci.edu>
2 7
3 * callproc.c (Fcall_process): Remove always true #if. 8 * callproc.c (Fcall_process): Remove always true #if.
@@ -32,6 +37,9 @@
32 37
332009-08-25 Kenichi Handa <handa@m17n.org> 382009-08-25 Kenichi Handa <handa@m17n.org>
34 39
40 * alloc.c (mark_char_table): New function.
41 (mark_object): Use mark_char_table for a char-table.
42
35 * lisp.h (CHAR_TABLE_REF_ASCII): New macro. 43 * lisp.h (CHAR_TABLE_REF_ASCII): New macro.
36 (CHAR_TABLE_REF): Use it. 44 (CHAR_TABLE_REF): Use it.
37 45
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 }