diff options
| author | Alan Third | 2020-05-20 21:28:25 +0100 |
|---|---|---|
| committer | Alan Third | 2020-08-01 19:46:51 +0100 |
| commit | a8f99d113c0556fd2860304ac7d7ff1c8f7c3ad4 (patch) | |
| tree | fd47117e4901e22e846dd16b7270b6032b11b67f /src | |
| parent | b04d391d796281faf0f824ed398b26a9a1758f8d (diff) | |
| download | emacs-a8f99d113c0556fd2860304ac7d7ff1c8f7c3ad4.tar.gz emacs-a8f99d113c0556fd2860304ac7d7ff1c8f7c3ad4.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/nsterm.m | 3 |
1 files changed, 2 insertions, 1 deletions
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) | |||
| 5476 | { | 5476 | { |
| 5477 | NSColorList *cl = [NSColorList colorListNamed: @"Emacs"]; | 5477 | NSColorList *cl = [NSColorList colorListNamed: @"Emacs"]; |
| 5478 | 5478 | ||
| 5479 | if ( cl == nil ) | 5479 | /* There are 752 colors defined in rgb.txt. */ |
| 5480 | if ( cl == nil || [[cl allKeys] count] < 752) | ||
| 5480 | { | 5481 | { |
| 5481 | Lisp_Object color_file, color_map, color; | 5482 | Lisp_Object color_file, color_map, color; |
| 5482 | unsigned long c; | 5483 | unsigned long c; |