SHA256
1
0
forked from pool/xemacs
xemacs/set-locale-to-c-when-not-supported-by-x.patch

18 lines
672 B
Diff
Raw Permalink Normal View History

Index: xemacs-21.5.29/src/intl.c
===================================================================
--- xemacs-21.5.29.orig/src/intl.c
+++ xemacs-21.5.29/src/intl.c
@@ -84,8 +84,10 @@ Otherwise, returns the locale, or possib
#ifdef HAVE_X_WINDOWS
if (!init_x_locale (locale))
{
- /* Locale not supported under X. Put it back. */
- setlocale (LC_ALL, loc);
+ /* Locale not supported under X. Set locale to "C" and print a warning. */
+ warn_when_safe (Qwarning, Qwarning,
+ "locale not supported by Xlib, setting locale to C.");
+ setlocale (LC_ALL, "C");
setlocale (LC_NUMERIC, "C");
free (loc);
return Qnil;