summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2020-01-26 00:20:40 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2020-01-26 00:34:38 -0800
commit26d890c9ccb1e95f5451432bb6bb764b590b165e (patch)
tree2d664b3db019513ba11021eff23c7bed735fcdb9 /src
parente97da6b08b1849fa9138fffce01e2ed0b8e2cc5c (diff)
downloademacs-26d890c9ccb1e95f5451432bb6bb764b590b165e.tar.gz
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).
Diffstat (limited to 'src')
-rw-r--r--src/emacs.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/emacs.c b/src/emacs.c
index 4b5d00a0e80..c170333e603 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1242,6 +1242,9 @@ main (int argc, char **argv)
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 ();
}
@@ -1610,10 +1613,6 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
#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)
{
@@ -1724,11 +1723,6 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
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. */