From da02b9edadbc809b25ac83eccf64089f1cf3b160 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Mon, 3 Oct 2022 20:18:22 +0800 Subject: Fix coding systems used for X input methods * doc/emacs/mule.texi (International): Refer to X Coding as well. (Communication Coding): Document that locale-coding-system is not always used on X to decode keyboard input. (X Coding): New node. * etc/NEWS: Announce change to input method coding resolution. * lisp/term/x-win.el (x-get-input-coding-system): New function. * src/coding.c (syms_of_coding): Update doc string of locale-coding-system. * src/xfns.c (struct x_xim_text_conversion_data) (x_xim_text_to_utf8_unix_1, x_xim_text_to_utf8_unix_2) (x_xim_text_to_utf8_unix): Accept dpyinfo. Use the coding system specified inside if possible. (xic_preedit_draw_callback): Pass dpyinfo. * src/xterm.c (handle_one_xevent): Use XIM coding system for IM input. (xim_open_dpy): Try to determine the input method coding system. (mark_xterm): Mark `xim_coding'. (syms_of_xterm): New variable `x-input-coding-system'. * src/xterm.h (struct x_display_info): New field `xim_coding'. (FRAME_X_XIM_CODING): New macro. --- src/coding.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/coding.c') diff --git a/src/coding.c b/src/coding.c index 0ae8eb3282b..ab73bda8440 100644 --- a/src/coding.c +++ b/src/coding.c @@ -12014,9 +12014,9 @@ See also the function `find-operation-coding-system'. */); Vnetwork_coding_system_alist = Qnil; DEFVAR_LISP ("locale-coding-system", Vlocale_coding_system, - doc: /* Coding system to use with system messages. -Also used for decoding keyboard input on X Window system, and for -encoding standard output and error streams. */); + doc: /* Coding system to use with system messages. +Potentially also used for decoding keyboard input on X Windows, and is +used for encoding standard output and error streams. */); Vlocale_coding_system = Qnil; /* The eol mnemonics are reset in startup.el system-dependently. */ -- cgit v1.2.3