diff options
| author | Eli Zaretskii | 2020-09-18 11:43:12 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2020-09-18 11:43:12 +0300 |
| commit | a22fdc962003b9f46fe839a37d64d80427bec850 (patch) | |
| tree | 4e718b3ecac40b58fc5d79cfeffb6d84c40043e8 | |
| parent | 75873450e1b036daab94124f92c71a23fc442a57 (diff) | |
| download | emacs-a22fdc962003b9f46fe839a37d64d80427bec850.tar.gz emacs-a22fdc962003b9f46fe839a37d64d80427bec850.zip | |
Minor cleanup of last change
* src/termchar.h (struct tty_display_info):
* src/term.c (turn_on_face, tty_capable_p): Reformat new code.
| -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) | |||
| 1931 | if (face->tty_underline_p && MAY_USE_WITH_COLORS_P (tty, NC_UNDERLINE)) | 1931 | if (face->tty_underline_p && MAY_USE_WITH_COLORS_P (tty, NC_UNDERLINE)) |
| 1932 | OUTPUT1_IF (tty, tty->TS_enter_underline_mode); | 1932 | OUTPUT1_IF (tty, tty->TS_enter_underline_mode); |
| 1933 | 1933 | ||
| 1934 | if (face->tty_strike_through_p && MAY_USE_WITH_COLORS_P (tty, NC_STRIKE_THROUGH)) | 1934 | if (face->tty_strike_through_p |
| 1935 | && MAY_USE_WITH_COLORS_P (tty, NC_STRIKE_THROUGH)) | ||
| 1935 | OUTPUT1_IF (tty, tty->TS_enter_strike_through_mode); | 1936 | OUTPUT1_IF (tty, tty->TS_enter_strike_through_mode); |
| 1936 | 1937 | ||
| 1937 | if (tty->TN_max_colors > 0) | 1938 | if (tty->TN_max_colors > 0) |
| @@ -2010,12 +2011,20 @@ tty_capable_p (struct tty_display_info *tty, unsigned int caps) | |||
| 2010 | if ((caps & (cap)) && (!(TS) || !MAY_USE_WITH_COLORS_P(tty, NC_bit))) \ | 2011 | if ((caps & (cap)) && (!(TS) || !MAY_USE_WITH_COLORS_P(tty, NC_bit))) \ |
| 2011 | return 0; | 2012 | return 0; |
| 2012 | 2013 | ||
| 2013 | TTY_CAPABLE_P_TRY (tty, TTY_CAP_INVERSE, tty->TS_standout_mode, NC_REVERSE); | 2014 | TTY_CAPABLE_P_TRY (tty, |
| 2014 | TTY_CAPABLE_P_TRY (tty, TTY_CAP_UNDERLINE, tty->TS_enter_underline_mode, NC_UNDERLINE); | 2015 | TTY_CAP_INVERSE, tty->TS_standout_mode, NC_REVERSE); |
| 2015 | TTY_CAPABLE_P_TRY (tty, TTY_CAP_BOLD, tty->TS_enter_bold_mode, NC_BOLD); | 2016 | TTY_CAPABLE_P_TRY (tty, |
| 2016 | TTY_CAPABLE_P_TRY (tty, TTY_CAP_DIM, tty->TS_enter_dim_mode, NC_DIM); | 2017 | TTY_CAP_UNDERLINE, tty->TS_enter_underline_mode, |
| 2017 | TTY_CAPABLE_P_TRY (tty, TTY_CAP_ITALIC, tty->TS_enter_italic_mode, NC_ITALIC); | 2018 | NC_UNDERLINE); |
| 2018 | TTY_CAPABLE_P_TRY (tty, TTY_CAP_STRIKE_THROUGH, tty->TS_enter_strike_through_mode, NC_STRIKE_THROUGH); | 2019 | TTY_CAPABLE_P_TRY (tty, |
| 2020 | TTY_CAP_BOLD, tty->TS_enter_bold_mode, NC_BOLD); | ||
| 2021 | TTY_CAPABLE_P_TRY (tty, | ||
| 2022 | TTY_CAP_DIM, tty->TS_enter_dim_mode, NC_DIM); | ||
| 2023 | TTY_CAPABLE_P_TRY (tty, | ||
| 2024 | TTY_CAP_ITALIC, tty->TS_enter_italic_mode, NC_ITALIC); | ||
| 2025 | TTY_CAPABLE_P_TRY (tty, | ||
| 2026 | TTY_CAP_STRIKE_THROUGH, tty->TS_enter_strike_through_mode, | ||
| 2027 | NC_STRIKE_THROUGH); | ||
| 2019 | 2028 | ||
| 2020 | /* We can do it! */ | 2029 | /* We can do it! */ |
| 2021 | return 1; | 2030 | 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 | |||
| 136 | const char *TS_enter_reverse_mode; /* "mr" -- enter reverse video mode. */ | 136 | const char *TS_enter_reverse_mode; /* "mr" -- enter reverse video mode. */ |
| 137 | const char *TS_exit_underline_mode; /* "us" -- start underlining. */ | 137 | const char *TS_exit_underline_mode; /* "us" -- start underlining. */ |
| 138 | const char *TS_enter_underline_mode; /* "ue" -- end underlining. */ | 138 | const char *TS_enter_underline_mode; /* "ue" -- end underlining. */ |
| 139 | const char *TS_enter_strike_through_mode; /* "smxx" -- turn on strike-through mode. */ | 139 | const char *TS_enter_strike_through_mode; /* "smxx" -- turn on strike-through |
| 140 | mode. */ | ||
| 140 | 141 | ||
| 141 | /* "as"/"ae" -- start/end alternate character set. Not really | 142 | /* "as"/"ae" -- start/end alternate character set. Not really |
| 142 | supported, yet. */ | 143 | supported, yet. */ |