Subject: bug#62265: Underline does not work in Terminal Emacs

From: Eli Zaretskii <[email-masked]>
Date: Sat, 18 Mar 2023 20:01:42 +0200

> From: Mohsin Kaleem <[email-masked]>
> Date: Sat, 18 Mar 2023 17:40:51 +0000
> 
> Underline support for tty frames was added to Emacs back in the Emacs
> 28.0.90 release. It hasn't worked for me since. Today I tried
> investigating why. I tracked it down ncurses and discovered the tgetstr
> function to retrieve the escape sequence for underline support doesn't
> fetch the value configured in the terminfo database for my Terminal
> (st). I can reproduce this function failing to fetch the entry in a
> minimal sample program (code attached).
> [...]
> --- a/src/term.c
> +++ b/src/term.c
> @@ -4163,7 +4163,11 @@ use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\
>    tty->TS_enter_alt_charset_mode = tgetstr ("as", address);
>    tty->TS_exit_alt_charset_mode = tgetstr ("ae", address);
>    tty->TS_exit_attribute_mode = tgetstr ("me", address);
> +#ifdef TERMINFO
> +  tty->TS_enter_strike_through_mode = tigetstr ("smxx");
> +#else
>    tty->TS_enter_strike_through_mode = tgetstr ("smxx", address);
> +#end

There's something I don't understand here: you are talking about
underline support, but the proposed patch affects the support for
strike-through, not underline.  What am I missing here?