diff options
| author | Eli Zaretskii <eliz@gnu.org> | 2020-09-18 11:43:12 +0300 |
|---|---|---|
| committer | Eli Zaretskii <eliz@gnu.org> | 2020-09-18 11:43:12 +0300 |
| commit | a22fdc962003b9f46fe839a37d64d80427bec850 (patch) | |
| tree | 4e718b3ecac40b58fc5d79cfeffb6d84c40043e8 /src | |
| parent | 75873450e1b036daab94124f92c71a23fc442a57 (diff) | |
Minor cleanup of last change
* src/termchar.h (struct tty_display_info):
* src/term.c (turn_on_face, tty_capable_p): Reformat new code.
Diffstat (limited to 'src')
| -rw-r--r-- | src/term.c | 23 | ||||
| -rw-r--r-- | src/termchar.h | 3 |
2 files changed, 18 insertions, 8 deletions
diff --git a/src/term.c b/src/term.c index 22035f4fe3a..3f528585ba1 100644 --- a/src/term.c +++ b/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; diff --git a/src/termchar.h b/src/termchar.h index a8b30517677..c967e7d04f4 100644 --- a/src/termchar.h +++ b/src/termchar.h @@ -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. */ |
