- face->foreground = FACE_TTY_DEFAULT_FG_COLOR;
- face->background = FACE_TTY_DEFAULT_BG_COLOR;
-
- XSETFRAME (frame, cache->f);
- color = attrs[LFACE_FOREGROUND_INDEX];
- if (STRINGP (color)
- && XSTRING (color)->size
- && CONSP (tty_defined_color_alist)
- && (color = Fassoc (color, call1 (tty_color_alist, frame)),
- CONSP (color)))
- /* Associations in tty-defined-color-alist are of the form
- (NAME INDEX R G B). We need the INDEX part. */
- face->foreground = XINT (XCAR (XCDR (color)));
-
- if (face->foreground == FACE_TTY_DEFAULT_FG_COLOR
- && STRINGP (attrs[LFACE_FOREGROUND_INDEX]))
- {
- face->foreground = load_color (cache->f, face,
- attrs[LFACE_FOREGROUND_INDEX],
- LFACE_FOREGROUND_INDEX);
-
-#if defined (MSDOS) || defined (WINDOWSNT)
- /* If the foreground of the default face is the default color,
- use the foreground color defined by the frame. */
-#ifdef MSDOS
- if (FRAME_MSDOS_P (cache->f))
- {
-#endif /* MSDOS */
-
- if (face->foreground == FACE_TTY_DEFAULT_FG_COLOR
- || face->foreground == FACE_TTY_DEFAULT_COLOR)
- {
- face->foreground = FRAME_FOREGROUND_PIXEL (cache->f);
- attrs[LFACE_FOREGROUND_INDEX] =
- tty_color_name (cache->f, face->foreground);
- face_colors_defaulted = 1;
- }
- else if (face->foreground == FACE_TTY_DEFAULT_BG_COLOR)
- {
- face->foreground = FRAME_BACKGROUND_PIXEL (cache->f);
- attrs[LFACE_FOREGROUND_INDEX] =
- tty_color_name (cache->f, face->foreground);
- face_colors_defaulted = 1;
- }
-#ifdef MSDOS
- }
-#endif
-#endif /* MSDOS or WINDOWSNT */
- }
-
- color = attrs[LFACE_BACKGROUND_INDEX];
- if (STRINGP (color)
- && XSTRING (color)->size
- && CONSP (tty_defined_color_alist)
- && (color = Fassoc (color, call1 (tty_color_alist, frame)),
- CONSP (color)))
- /* Associations in tty-defined-color-alist are of the form
- (NAME INDEX R G B). We need the INDEX part. */
- face->background = XINT (XCAR (XCDR (color)));
-
- if (face->background == FACE_TTY_DEFAULT_BG_COLOR
- && STRINGP (attrs[LFACE_BACKGROUND_INDEX]))
- {
- face->background = load_color (cache->f, face,
- attrs[LFACE_BACKGROUND_INDEX],
- LFACE_BACKGROUND_INDEX);
-#if defined (MSDOS) || defined (WINDOWSNT)
- /* If the background of the default face is the default color,
- use the background color defined by the frame. */
-#ifdef MSDOS
- if (FRAME_MSDOS_P (cache->f))
- {
-#endif /* MSDOS */
-
- if (face->background == FACE_TTY_DEFAULT_BG_COLOR
- || face->background == FACE_TTY_DEFAULT_COLOR)
- {
- face->background = FRAME_BACKGROUND_PIXEL (cache->f);
- attrs[LFACE_BACKGROUND_INDEX] =
- tty_color_name (cache->f, face->background);
- face_colors_defaulted = 1;
- }
- else if (face->background == FACE_TTY_DEFAULT_FG_COLOR)
- {
- face->background = FRAME_FOREGROUND_PIXEL (cache->f);
- attrs[LFACE_BACKGROUND_INDEX] =
- tty_color_name (cache->f, face->background);
- face_colors_defaulted = 1;
- }
-#ifdef MSDOS
- }
-#endif
-#endif /* MSDOS or WINDOWSNT */
- }
-