From 2f73996647ab34410440c2ae7965199577c59522 Mon Sep 17 00:00:00 2001 From: Zeke Dou Date: Sun, 5 Apr 2026 15:16:53 +0200 Subject: [PATCH] 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 --- src/emacs.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/emacs.c b/src/emacs.c index 7ae572120f6..11fe567737a 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -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. */