diff options
| author | Eli Zaretskii | 2024-06-15 11:08:22 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2024-06-15 11:08:22 +0300 |
| commit | 988203fe980e3c80f736ad0b6aae9f288ebfa0f1 (patch) | |
| tree | 8b8a48523863d7f062d2acc3b8549cdb5097ed87 /src | |
| parent | 8d67bdae59425fbc7dccd35b89c019c7757c1acd (diff) | |
| download | emacs-988203fe980e3c80f736ad0b6aae9f288ebfa0f1.tar.gz emacs-988203fe980e3c80f736ad0b6aae9f288ebfa0f1.zip | |
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)
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmds.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/cmds.c b/src/cmds.c index f7a3f9e7ac6..ba5cef9dd48 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -278,6 +278,8 @@ a non-nil value for the inserted character. At the end, it runs | |||
| 278 | /* Backward compatibility. */ | 278 | /* Backward compatibility. */ |
| 279 | if (NILP (c)) | 279 | if (NILP (c)) |
| 280 | c = last_command_event; | 280 | c = last_command_event; |
| 281 | else | ||
| 282 | last_command_event = c; | ||
| 281 | 283 | ||
| 282 | if (XFIXNUM (n) < 0) | 284 | if (XFIXNUM (n) < 0) |
| 283 | error ("Negative repetition argument %"pI"d", XFIXNUM (n)); | 285 | 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 | |||
| 288 | /* Barf if the key that invoked this was not a character. */ | 290 | /* Barf if the key that invoked this was not a character. */ |
| 289 | if (!CHARACTERP (c)) | 291 | if (!CHARACTERP (c)) |
| 290 | bitch_at_user (); | 292 | bitch_at_user (); |
| 291 | else { | 293 | else |
| 292 | int character = translate_char (Vtranslation_table_for_input, | 294 | { |
| 293 | XFIXNUM (c)); | 295 | int character = translate_char (Vtranslation_table_for_input, |
| 294 | int val = internal_self_insert (character, XFIXNAT (n)); | 296 | XFIXNUM (c)); |
| 295 | if (val == 2) | 297 | int val = internal_self_insert (character, XFIXNAT (n)); |
| 296 | Fset (Qundo_auto__this_command_amalgamating, Qnil); | 298 | if (val == 2) |
| 297 | frame_make_pointer_invisible (SELECTED_FRAME ()); | 299 | Fset (Qundo_auto__this_command_amalgamating, Qnil); |
| 298 | } | 300 | frame_make_pointer_invisible (SELECTED_FRAME ()); |
| 301 | } | ||
| 299 | 302 | ||
| 300 | return Qnil; | 303 | return Qnil; |
| 301 | } | 304 | } |