Move ns_init_colors() after init_callproc() (bug#80752)

'data-directory' needs to be established in advance of 'ns_init_colors'
to ensure the file "etc/rgb.txt" is read.  This was encountered on an
out-of-tree Nix build.

* src/emacs.c (main): Move the 'ns_init_colors' after 'init_callproc'.

Copyright-paperwork-exempt: yes
This commit is contained in:
Zeke Dou 2026-04-05 15:16:53 +02:00 committed by Alan Third
parent a9064bfdd9
commit 2f73996647

View file

@ -2050,10 +2050,6 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
#endif
#ifdef HAVE_NS
/* For early calls to ns_lisp_to_color or Fns_list_colors. */
if (!dump_mode)
ns_init_colors ();
if (!noninteractive)
{
#ifdef NS_IMPL_COCOA
@ -2293,6 +2289,13 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
check_windows_init_file ();
#endif
#ifdef HAVE_NS
/* For early calls to ns_lisp_to_color or Fns_list_colors.
Must follow init_callproc which sets data-directory. */
if (!dump_mode)
ns_init_colors ();
#endif
/* Intern the names of all standard functions and variables;
define standard keys. */