Fix electric-pair-mode when characters are bound to non-ASCII keys
* src/cmds.c (Fself_insert_command): Record the argument C in 'last-command-event'. (Bug#71337)
This commit is contained in:
parent
8d67bdae59
commit
988203fe98
1 changed files with 11 additions and 8 deletions
19
src/cmds.c
19
src/cmds.c
|
@ -278,6 +278,8 @@ a non-nil value for the inserted character. At the end, it runs
|
|||
/* Backward compatibility. */
|
||||
if (NILP (c))
|
||||
c = last_command_event;
|
||||
else
|
||||
last_command_event = c;
|
||||
|
||||
if (XFIXNUM (n) < 0)
|
||||
error ("Negative repetition argument %"pI"d", XFIXNUM (n));
|
||||
|
@ -288,14 +290,15 @@ a non-nil value for the inserted character. At the end, it runs
|
|||
/* Barf if the key that invoked this was not a character. */
|
||||
if (!CHARACTERP (c))
|
||||
bitch_at_user ();
|
||||
else {
|
||||
int character = translate_char (Vtranslation_table_for_input,
|
||||
XFIXNUM (c));
|
||||
int val = internal_self_insert (character, XFIXNAT (n));
|
||||
if (val == 2)
|
||||
Fset (Qundo_auto__this_command_amalgamating, Qnil);
|
||||
frame_make_pointer_invisible (SELECTED_FRAME ());
|
||||
}
|
||||
else
|
||||
{
|
||||
int character = translate_char (Vtranslation_table_for_input,
|
||||
XFIXNUM (c));
|
||||
int val = internal_self_insert (character, XFIXNAT (n));
|
||||
if (val == 2)
|
||||
Fset (Qundo_auto__this_command_amalgamating, Qnil);
|
||||
frame_make_pointer_invisible (SELECTED_FRAME ());
|
||||
}
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue