* src/emacs.c (main): Call ns_init_locale before using the
environment variable that ns_init_locale sets up (Bug#39248).
char *lc_all = getenv ("LC_ALL");
if (! (lc_all && strcmp (lc_all, "C") == 0))
{
+ #ifdef HAVE_NS
+ ns_init_locale ();
+ #endif
setlocale (LC_ALL, "");
fixup_locale ();
}
#ifdef HAVE_NS
ns_pool = ns_alloc_autorelease_pool ();
-#ifdef NS_IMPL_GNUSTEP
- /* GNUstep stupidly resets our locale settings after we made them. */
- fixup_locale ();
-#endif
if (!noninteractive)
{
globals_of_gfilenotify ();
#endif
-#ifdef HAVE_NS
- /* Initialize the locale from user defaults. */
- ns_init_locale ();
-#endif
-
/* Initialize and GC-protect Vinitial_environment and
Vprocess_environment before set_initial_environment fills them
in. */