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

18 lines
705 B
Diff

diff -ru xemacs-21.5.25.20060327.orig/src/intl.c xemacs-21.5.25.20060327/src/intl.c
--- xemacs-21.5.25.20060327.orig/src/intl.c 2005-12-27 18:12:09.000000000 +0100
+++ xemacs-21.5.25.20060327/src/intl.c 2006-03-27 17:06:52.000000000 +0200
@@ -84,8 +84,10 @@
#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;