From 63f033c2214db4baabf9f85b2a44cd3a9118b709 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 30 Sep 2022 19:38:25 +0200 Subject: [PATCH] Further with-locale-environment refresh fixes * lisp/international/mule-cmds.el (set-display-table-and-terminal-coding-system): Allow inhibiting refresh. (set-locale-environment): Inhibit refresh in more paths (bug#58193). --- lisp/international/mule-cmds.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 51147943dc2..8bece9a3ee6 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -1909,8 +1909,11 @@ The default status is as follows: (reset-language-environment) -(defun set-display-table-and-terminal-coding-system (language-name &optional coding-system display) - "Set up the display table and terminal coding system for LANGUAGE-NAME." +(defun set-display-table-and-terminal-coding-system (language-name + &optional coding-system + display inhibit-refresh) + "Set up the display table and terminal coding system for LANGUAGE-NAME. +If INHIBIT-REFRESH, don't redraw the current frame." (let ((coding (get-language-info language-name 'unibyte-display))) (if (and coding (or (not coding-system) @@ -1923,7 +1926,8 @@ The default status is as follows: (when standard-display-table (dotimes (i 128) (aset standard-display-table (+ i 128) nil)))) - (set-terminal-coding-system (or coding-system coding) display))) + (set-terminal-coding-system (or coding-system coding) display + inhibit-refresh))) (defun set-language-environment (language-name) "Set up multilingual environment for using LANGUAGE-NAME. @@ -2811,7 +2815,7 @@ See also `locale-charset-language-names', `locale-language-names', (set-language-environment language-name)) (set-display-table-and-terminal-coding-system - language-name coding-system frame) + language-name coding-system frame inhibit-refresh) ;; Set the `keyboard-coding-system' if appropriate (tty ;; only). At least X and MS Windows can generate -- 2.39.2