Subject: bug#69598: 29.2; colour support based on $TERM value not terminfo database

From: Eli Zaretskii <[email-masked]>
Date: Thu, 07 Mar 2024 22:10:30 +0200

> From: [email-masked]
> cc: [email-masked], [email-masked]
> Comments: In-reply-to Eli Zaretskii <[email-masked]>
>    message dated "Thu, 07 Mar 2024 21:26:32 +0200."
> Date: Thu, 07 Mar 2024 19:59:17 +0000
> 
> But the problem is not with the terminfo entry itself. The new entry
> is an exact duplicate of a working terminfo entry (where working
> means that list-colors-display lists 256 named colours) and it only
> works if the new entry has a name which begins "xterm-".
> 
> This means that somewhere between running the code above which does
> detect that 16M colours are available, emacs discards that information
> and instead (seems to) decide that support is there based on the
> name of the terminal in $TERM.

If you or someone else could establish that tty->TN_max_colors
receives the correct value of the number of supported colors during
initialization, and yet Emacs still doesn't realize those colors
unless the TERM name begins with "xterm", we could make some progress,
because it could point us to the code which is responsible for this
lossage.  Right now, I don't know where to look.