diff options
| author | Po Lu | 2023-08-19 08:51:44 +0800 |
|---|---|---|
| committer | Po Lu | 2023-08-19 08:51:44 +0800 |
| commit | 449008a60f1d72fb1ec8cff356b6743619796b6b (patch) | |
| tree | 6dec1fee25a4a4ed99e8024f95992f94c1a8ab38 /src | |
| parent | 6a4b6c3e836ce06bb1f69615bbdcb6745d2aff6f (diff) | |
| download | emacs-449008a60f1d72fb1ec8cff356b6743619796b6b.tar.gz emacs-449008a60f1d72fb1ec8cff356b6743619796b6b.zip | |
Disable text conversion inside read-char-exclusive
* src/lread.c (read_filtered_event): Disable text conversion if
merely ascii_required. (bug#65370)
Diffstat (limited to 'src')
| -rw-r--r-- | src/lread.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lread.c b/src/lread.c index 251da5670d0..255b6e914d9 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -800,9 +800,9 @@ static void substitute_in_interval (INTERVAL, void *); | |||
| 800 | If SECONDS is a number, wait that many seconds for input, and | 800 | If SECONDS is a number, wait that many seconds for input, and |
| 801 | return Qnil if no input arrives within that time. | 801 | return Qnil if no input arrives within that time. |
| 802 | 802 | ||
| 803 | If text conversion is enabled and ASCII_REQUIRED && ERROR_NONASCII, | 803 | If text conversion is enabled and ASCII_REQUIRED, temporarily |
| 804 | temporarily disable any input method which wants to perform | 804 | disable any input method which wants to perform edits, unless |
| 805 | edits, unless `disable-inhibit-text-conversion'. */ | 805 | `disable-inhibit-text-conversion'. */ |
| 806 | 806 | ||
| 807 | static Lisp_Object | 807 | static Lisp_Object |
| 808 | read_filtered_event (bool no_switch_frame, bool ascii_required, | 808 | read_filtered_event (bool no_switch_frame, bool ascii_required, |
| @@ -825,8 +825,7 @@ read_filtered_event (bool no_switch_frame, bool ascii_required, | |||
| 825 | /* Don't use text conversion when trying to just read a | 825 | /* Don't use text conversion when trying to just read a |
| 826 | character. */ | 826 | character. */ |
| 827 | 827 | ||
| 828 | if (ascii_required && error_nonascii | 828 | if (ascii_required && !disable_inhibit_text_conversion) |
| 829 | && !disable_inhibit_text_conversion) | ||
| 830 | { | 829 | { |
| 831 | disable_text_conversion (); | 830 | disable_text_conversion (); |
| 832 | record_unwind_protect_void (resume_text_conversion); | 831 | record_unwind_protect_void (resume_text_conversion); |