]> git.eshelyaron.com Git - emacs.git/commitdiff
Use preferred XIM style without trying to detect if it's supported
authorPo Lu <luangruo@yahoo.com>
Sat, 15 Jan 2022 12:14:31 +0000 (20:14 +0800)
committerPo Lu <luangruo@yahoo.com>
Sat, 15 Jan 2022 12:17:22 +0000 (20:17 +0800)
The old code would in general fall back to the default if the
preferred style wasn't available, which is usually worse than
what the user specified

* src/xfns.c (best_xim_style): Stop checking if the preferred
input style is supported.

src/xfns.c

index ffad0bc3d1a4931718f7d7172badd04b49373864..d73e951754b919cf6cac1fe4d3ea9565843a053a 100644 (file)
@@ -2643,11 +2643,7 @@ best_xim_style (struct x_display_info *dpyinfo,
   int nr_supported = ARRAYELTS (supported_xim_styles);
 
   if (dpyinfo->preferred_xim_style)
-    {
-      for (j = 0; j < xim->count_styles; ++j)
-       if (dpyinfo->preferred_xim_style == xim->supported_styles[j])
-         return dpyinfo->preferred_xim_style;
-    }
+    return dpyinfo->preferred_xim_style;
 
   for (i = 0; i < nr_supported; ++i)
     for (j = 0; j < xim->count_styles; ++j)