From: Alan Third Date: Wed, 20 May 2020 20:28:25 +0000 (+0100) Subject: Recreate macOS color list if it is corrupt X-Git-Tag: emacs-28.0.90~6875 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a8f99d113c0556fd2860304ac7d7ff1c8f7c3ad4;p=emacs.git Recreate macOS color list if it is corrupt * src/nsterm.m (ns_term_init): Generate the color list if there are less colors in the existing file than in rgb.txt. --- diff --git a/src/nsterm.m b/src/nsterm.m index 0e405fc0175..df7f716f51e 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -5476,7 +5476,8 @@ ns_term_init (Lisp_Object display_name) { NSColorList *cl = [NSColorList colorListNamed: @"Emacs"]; - if ( cl == nil ) + /* There are 752 colors defined in rgb.txt. */ + if ( cl == nil || [[cl allKeys] count] < 752) { Lisp_Object color_file, color_map, color; unsigned long c;