Minor cleanup of last change
* src/termchar.h (struct tty_display_info): * src/term.c (turn_on_face, tty_capable_p): Reformat new code.
This commit is contained in:
parent
75873450e1
commit
a22fdc9620
2 changed files with 18 additions and 8 deletions
23
src/term.c
23
src/term.c
|
@ -1931,7 +1931,8 @@ turn_on_face (struct frame *f, int face_id)
|
|||
if (face->tty_underline_p && MAY_USE_WITH_COLORS_P (tty, NC_UNDERLINE))
|
||||
OUTPUT1_IF (tty, tty->TS_enter_underline_mode);
|
||||
|
||||
if (face->tty_strike_through_p && MAY_USE_WITH_COLORS_P (tty, NC_STRIKE_THROUGH))
|
||||
if (face->tty_strike_through_p
|
||||
&& MAY_USE_WITH_COLORS_P (tty, NC_STRIKE_THROUGH))
|
||||
OUTPUT1_IF (tty, tty->TS_enter_strike_through_mode);
|
||||
|
||||
if (tty->TN_max_colors > 0)
|
||||
|
@ -2010,12 +2011,20 @@ tty_capable_p (struct tty_display_info *tty, unsigned int caps)
|
|||
if ((caps & (cap)) && (!(TS) || !MAY_USE_WITH_COLORS_P(tty, NC_bit))) \
|
||||
return 0;
|
||||
|
||||
TTY_CAPABLE_P_TRY (tty, TTY_CAP_INVERSE, tty->TS_standout_mode, NC_REVERSE);
|
||||
TTY_CAPABLE_P_TRY (tty, TTY_CAP_UNDERLINE, tty->TS_enter_underline_mode, NC_UNDERLINE);
|
||||
TTY_CAPABLE_P_TRY (tty, TTY_CAP_BOLD, tty->TS_enter_bold_mode, NC_BOLD);
|
||||
TTY_CAPABLE_P_TRY (tty, TTY_CAP_DIM, tty->TS_enter_dim_mode, NC_DIM);
|
||||
TTY_CAPABLE_P_TRY (tty, TTY_CAP_ITALIC, tty->TS_enter_italic_mode, NC_ITALIC);
|
||||
TTY_CAPABLE_P_TRY (tty, TTY_CAP_STRIKE_THROUGH, tty->TS_enter_strike_through_mode, NC_STRIKE_THROUGH);
|
||||
TTY_CAPABLE_P_TRY (tty,
|
||||
TTY_CAP_INVERSE, tty->TS_standout_mode, NC_REVERSE);
|
||||
TTY_CAPABLE_P_TRY (tty,
|
||||
TTY_CAP_UNDERLINE, tty->TS_enter_underline_mode,
|
||||
NC_UNDERLINE);
|
||||
TTY_CAPABLE_P_TRY (tty,
|
||||
TTY_CAP_BOLD, tty->TS_enter_bold_mode, NC_BOLD);
|
||||
TTY_CAPABLE_P_TRY (tty,
|
||||
TTY_CAP_DIM, tty->TS_enter_dim_mode, NC_DIM);
|
||||
TTY_CAPABLE_P_TRY (tty,
|
||||
TTY_CAP_ITALIC, tty->TS_enter_italic_mode, NC_ITALIC);
|
||||
TTY_CAPABLE_P_TRY (tty,
|
||||
TTY_CAP_STRIKE_THROUGH, tty->TS_enter_strike_through_mode,
|
||||
NC_STRIKE_THROUGH);
|
||||
|
||||
/* We can do it! */
|
||||
return 1;
|
||||
|
|
|
@ -136,7 +136,8 @@ struct tty_display_info
|
|||
const char *TS_enter_reverse_mode; /* "mr" -- enter reverse video mode. */
|
||||
const char *TS_exit_underline_mode; /* "us" -- start underlining. */
|
||||
const char *TS_enter_underline_mode; /* "ue" -- end underlining. */
|
||||
const char *TS_enter_strike_through_mode; /* "smxx" -- turn on strike-through mode. */
|
||||
const char *TS_enter_strike_through_mode; /* "smxx" -- turn on strike-through
|
||||
mode. */
|
||||
|
||||
/* "as"/"ae" -- start/end alternate character set. Not really
|
||||
supported, yet. */
|
||||
|
|
Loading…
Add table
Reference in a new issue