diff --git a/src/keyboard.c b/src/keyboard.c index 2e4c4e6aab..34322be6fe 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -3067,7 +3067,9 @@ read_char (int commandflag, Lisp_Object map, /* Don't run the input method within a key sequence, after the first event of the key sequence. */ && NILP (prev_event) - && ' ' <= XFIXNUM (c) && XFIXNUM (c) < 256 && XFIXNUM (c) != 127) + && ' ' <= XFIXNUM (c) + && (! NILP (Vinput_method_translate_unicode) || XFIXNUM (c) < 256) + && XFIXNUM (c) != 127) { Lisp_Object keys; ptrdiff_t key_count; @@ -12325,6 +12327,11 @@ syms_of_keyboard (void) before running the input method. It is nil if there was no message. */); Vinput_method_previous_message = Qnil; + DEFVAR_LISP ("input-method-translate-unicode", + Vinput_method_translate_unicode, + doc: /* If non-nil, allows `read-char` to use charcodes over 255 in input methods. */); + Vinput_method_translate_unicode = Qnil; + DEFVAR_LISP ("show-help-function", Vshow_help_function, doc: /* If non-nil, the function that implements the display of help. It's called with one argument, the help string to display. */);