Skip to content

Commit 26d890c

Browse files
committed
Propagate NSLocale into Emacs better
* src/emacs.c (main): Call ns_init_locale before using the environment variable that ns_init_locale sets up (Bug#39248).
1 parent e97da6b commit 26d890c

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/emacs.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,9 @@ main (int argc, char **argv)
12421242
char *lc_all = getenv ("LC_ALL");
12431243
if (! (lc_all && strcmp (lc_all, "C") == 0))
12441244
{
1245+
#ifdef HAVE_NS
1246+
ns_init_locale ();
1247+
#endif
12451248
setlocale (LC_ALL, "");
12461249
fixup_locale ();
12471250
}
@@ -1610,10 +1613,6 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
16101613

16111614
#ifdef HAVE_NS
16121615
ns_pool = ns_alloc_autorelease_pool ();
1613-
#ifdef NS_IMPL_GNUSTEP
1614-
/* GNUstep stupidly resets our locale settings after we made them. */
1615-
fixup_locale ();
1616-
#endif
16171616

16181617
if (!noninteractive)
16191618
{
@@ -1724,11 +1723,6 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
17241723
globals_of_gfilenotify ();
17251724
#endif
17261725

1727-
#ifdef HAVE_NS
1728-
/* Initialize the locale from user defaults. */
1729-
ns_init_locale ();
1730-
#endif
1731-
17321726
/* Initialize and GC-protect Vinitial_environment and
17331727
Vprocess_environment before set_initial_environment fills them
17341728
in. */

0 commit comments

Comments
 (0)