diff options
Diffstat (limited to 'src/cmds.c')
| -rw-r--r-- | src/cmds.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/cmds.c b/src/cmds.c index 6314df416a0..6d09556f32c 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -25,7 +25,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 25 | #include "lisp.h" | 25 | #include "lisp.h" |
| 26 | #include "commands.h" | 26 | #include "commands.h" |
| 27 | #include "buffer.h" | 27 | #include "buffer.h" |
| 28 | #include "charset.h" | 28 | #include "character.h" |
| 29 | #include "syntax.h" | 29 | #include "syntax.h" |
| 30 | #include "window.h" | 30 | #include "window.h" |
| 31 | #include "keyboard.h" | 31 | #include "keyboard.h" |
| @@ -328,11 +328,11 @@ Whichever character you type to run this command is inserted. */) | |||
| 328 | CHECK_NUMBER (n); | 328 | CHECK_NUMBER (n); |
| 329 | 329 | ||
| 330 | /* Barf if the key that invoked this was not a character. */ | 330 | /* Barf if the key that invoked this was not a character. */ |
| 331 | if (!INTEGERP (last_command_char)) | 331 | if (!CHARACTERP (last_command_char)) |
| 332 | bitch_at_user (); | 332 | bitch_at_user (); |
| 333 | { | 333 | { |
| 334 | int character = translate_char (Vtranslation_table_for_input, | 334 | int character = translate_char (Vtranslation_table_for_input, |
| 335 | XINT (last_command_char), 0, 0, 0); | 335 | XINT (last_command_char)); |
| 336 | if (XINT (n) >= 2 && NILP (current_buffer->overwrite_mode)) | 336 | if (XINT (n) >= 2 && NILP (current_buffer->overwrite_mode)) |
| 337 | { | 337 | { |
| 338 | int modified_char = character; | 338 | int modified_char = character; |
| @@ -396,7 +396,6 @@ internal_self_insert (c, noautofill) | |||
| 396 | /* At first, get multi-byte form of C in STR. */ | 396 | /* At first, get multi-byte form of C in STR. */ |
| 397 | if (!NILP (current_buffer->enable_multibyte_characters)) | 397 | if (!NILP (current_buffer->enable_multibyte_characters)) |
| 398 | { | 398 | { |
| 399 | c = unibyte_char_to_multibyte (c); | ||
| 400 | len = CHAR_STRING (c, str); | 399 | len = CHAR_STRING (c, str); |
| 401 | if (len == 1) | 400 | if (len == 1) |
| 402 | /* If C has modifier bits, this makes C an appropriate | 401 | /* If C has modifier bits, this makes C an appropriate |
| @@ -473,10 +472,19 @@ internal_self_insert (c, noautofill) | |||
| 473 | } | 472 | } |
| 474 | hairy = 2; | 473 | hairy = 2; |
| 475 | } | 474 | } |
| 475 | |||
| 476 | if (NILP (current_buffer->enable_multibyte_characters)) | ||
| 477 | MAKE_CHAR_MULTIBYTE (c); | ||
| 478 | synt = SYNTAX (c); | ||
| 479 | |||
| 476 | if (!NILP (current_buffer->abbrev_mode) | 480 | if (!NILP (current_buffer->abbrev_mode) |
| 477 | && SYNTAX (c) != Sword | 481 | && synt != Sword |
| 478 | && NILP (current_buffer->read_only) | 482 | && NILP (current_buffer->read_only) |
| 479 | && PT > BEGV && SYNTAX (XFASTINT (Fprevious_char ())) == Sword) | 483 | && PT > BEGV |
| 484 | && (!NILP (current_buffer->enable_multibyte_characters) | ||
| 485 | ? SYNTAX (XFASTINT (Fprevious_char ())) == Sword | ||
| 486 | : (SYNTAX (unibyte_char_to_multibyte (XFASTINT (Fprevious_char ()))) | ||
| 487 | == Sword))) | ||
| 480 | { | 488 | { |
| 481 | int modiff = MODIFF; | 489 | int modiff = MODIFF; |
| 482 | Lisp_Object sym; | 490 | Lisp_Object sym; |
| @@ -545,7 +553,6 @@ internal_self_insert (c, noautofill) | |||
| 545 | Vself_insert_face = Qnil; | 553 | Vself_insert_face = Qnil; |
| 546 | } | 554 | } |
| 547 | 555 | ||
| 548 | synt = SYNTAX (c); | ||
| 549 | if ((synt == Sclose || synt == Smath) | 556 | if ((synt == Sclose || synt == Smath) |
| 550 | && !NILP (Vblink_paren_function) && INTERACTIVE | 557 | && !NILP (Vblink_paren_function) && INTERACTIVE |
| 551 | && !noautofill) | 558 | && !noautofill) |