]> git.eshelyaron.com Git - emacs.git/commitdiff
(turn_on_face): Check for TS_set_foreground and
authorJuri Linkov <juri@jurta.org>
Mon, 22 Aug 2005 20:47:49 +0000 (20:47 +0000)
committerJuri Linkov <juri@jurta.org>
Mon, 22 Aug 2005 20:47:49 +0000 (20:47 +0000)
TS_set_background depending on standout_mode.  Simplify.

src/term.c

index 76cf2e2c6f0210e7215fac1e8c76f003f9868eff..2b4ea7e23a4d53da96a133d96a53ff0b36a9446e 100644 (file)
@@ -2011,24 +2011,20 @@ turn_on_face (f, face_id)
 
   if (TN_max_colors > 0)
     {
-      char *p;
+      char *ts, *p;
 
-      if (fg >= 0 && TS_set_foreground)
+      ts = standout_mode ? TS_set_background : TS_set_foreground;
+      if (fg >= 0 && ts)
        {
-         if (standout_mode)
-           p = tparam (TS_set_background, NULL, 0, (int) fg);
-         else
-           p = tparam (TS_set_foreground, NULL, 0, (int) fg);
+         p = tparam (ts, NULL, 0, (int) fg);
          OUTPUT (p);
          xfree (p);
        }
 
-      if (bg >= 0 && TS_set_background)
+      ts = standout_mode ? TS_set_foreground : TS_set_background;
+      if (bg >= 0 && ts)
        {
-         if (standout_mode)
-           p = tparam (TS_set_foreground, NULL, 0, (int) bg);
-         else
-           p = tparam (TS_set_background, NULL, 0, (int) bg);
+         p = tparam (ts, NULL, 0, (int) bg);
          OUTPUT (p);
          xfree (p);
        }