aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJuri Linkov2005-08-22 20:47:49 +0000
committerJuri Linkov2005-08-22 20:47:49 +0000
commit753d161b0fa178327493c373de9d8777240c28cd (patch)
tree700fcbab40a39fb608c76bde0f9dd0487075dd65 /src
parentbac3a1c9b7f52b509ab6fc13570c68deb3efb01d (diff)
downloademacs-753d161b0fa178327493c373de9d8777240c28cd.tar.gz
emacs-753d161b0fa178327493c373de9d8777240c28cd.zip
(turn_on_face): Check for TS_set_foreground and
TS_set_background depending on standout_mode. Simplify.
Diffstat (limited to 'src')
-rw-r--r--src/term.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/term.c b/src/term.c
index 76cf2e2c6f0..2b4ea7e23a4 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2011,24 +2011,20 @@ turn_on_face (f, face_id)
2011 2011
2012 if (TN_max_colors > 0) 2012 if (TN_max_colors > 0)
2013 { 2013 {
2014 char *p; 2014 char *ts, *p;
2015 2015
2016 if (fg >= 0 && TS_set_foreground) 2016 ts = standout_mode ? TS_set_background : TS_set_foreground;
2017 if (fg >= 0 && ts)
2017 { 2018 {
2018 if (standout_mode) 2019 p = tparam (ts, NULL, 0, (int) fg);
2019 p = tparam (TS_set_background, NULL, 0, (int) fg);
2020 else
2021 p = tparam (TS_set_foreground, NULL, 0, (int) fg);
2022 OUTPUT (p); 2020 OUTPUT (p);
2023 xfree (p); 2021 xfree (p);
2024 } 2022 }
2025 2023
2026 if (bg >= 0 && TS_set_background) 2024 ts = standout_mode ? TS_set_foreground : TS_set_background;
2025 if (bg >= 0 && ts)
2027 { 2026 {
2028 if (standout_mode) 2027 p = tparam (ts, NULL, 0, (int) bg);
2029 p = tparam (TS_set_foreground, NULL, 0, (int) bg);
2030 else
2031 p = tparam (TS_set_background, NULL, 0, (int) bg);
2032 OUTPUT (p); 2028 OUTPUT (p);
2033 xfree (p); 2029 xfree (p);
2034 } 2030 }