(term_init): Intitialize TN_no_color_video.
(enum no_color_bit): New enumeration.
(MAY_USE_WITH_COLORS_P): New macro.
(turn_on_face): Use it to determine if attributes may be used
combined with colors.
on character terminals:
* dispextern.h (FACE_TTY_DEFAULT_FG_COLOR)
(FACE_TTY_DEFAULT_BG_COLOR): New macros.
* xfaces.c (Qunspecified_fg, Qunspecified_bg): New variables.
(syms_of_xfaces): Initialize and staticpro them.
(tty_defined_color): If the color name is unspecified-fg or
unspecified-bg, return FACE_TTY_DEFAULT_FG_COLOR and
FACE_TTY_DEFAULT_BG_COLOR, respectively, as the pixel value.
(tty_color_name): If the color pixel value is either
FACE_TTY_DEFAULT_FG_COLOR or FACE_TTY_DEFAULT_BG_COLOR, return
Qunspecified_fg or Qunspecified_bg, respectively.
(Finternal_set_lisp_face_attribute): Allow values Qunspecified_fg
and Qunspecified_bg for foreground and background colors.
(realize_default_face): If the foreground and background colors
are not specified, default to Qunspecified_fg and Qunspecified_bg.
(realize_tty_face): By default, set the face colors to
FACE_TTY_DEFAULT_FG_COLOR and FACE_TTY_DEFAULT_BG_COLOR.
[MSDOS]: Handle FACE_TTY_DEFAULT_FG_COLOR and
FACE_TTY_DEFAULT_BG_COLOR when face colors are not defined.
Reverse the colors if the default colors were reversed.
* dispnew.c (init_display): Initialize the frame pixels of the
initial frame to FACE_TTY_DEFAULT_FG_COLOR and
FACE_TTY_DEFAULT_BG_COLOR.
* term.c (turn_on_face): If the default fore- and background
colors are reversed, enter inverse video mode. Don't send color
escape sequences for unspecified foreground and background colors.
(turn_off_face): Handle unspecified-fg and unspecified-bg colors.
* dosfns.c (unspecified_colors): New variable.
(msdos_stdcolor_idx): Handle unspecified-fg and unspecified-bg
color names, return FACE_TTY_DEFAULT_FG_COLOR and
FACE_TTY_DEFAULT_BG_COLOR, respectively.
(msdos_stdcolor_name): Handle FACE_TTY_DEFAULT_FG_COLOR and
FACE_TTY_DEFAULT_BG_COLOR, return Qunspecified_fg and
Qunspecified_bg, respectively.
* msdos.c (IT_set_face): Support FACE_TTY_DEFAULT_FG_COLOR and
FACE_TTY_DEFAULT_BG_COLOR as pixel values.
* faces.el (face-read-integer, read-face-attribute)
(color-defined-p, color-values): Allow color values unspecified-fg
and unspecified-bg, handle them as unspecified.
character. Adjusted for the change of CHAR_STRING.
(produce_glyphs): When called, it->what can be IT_COMPOSITION.
Delete codes for a composite character.
(append_glyph): New.
(update_end): Turn cursor on only if selected window's
cursor_off_p flag is not set.
(TS_cursor_visible): Renamed from TS_visual_mode.
(TS_cursor_normal): Renamed from TS_end_visual_mode.
(TS_cursor_invisible): New.
(term_init): Initialize TS_cursor_invisible.
(tty_hide_cursor): New.
(tty_show_cursor): New.
(update_end): Show tty cursor.
(update_begin): Hide tty cursor to prevent cursor flickering
during redisplays triggered by timers (stealth fontification).
(estimate_mode_line_height): New.
(estimate_mode_line_height_hook): New.
(OUTPUT_IF): Make replacement text have statement form.
(OUTPUT1_IF): Ditto.
(TS_italic_mode, TS_end_italic_mode): Removed.
(TS_bold_mode): Removed.
(TS_underscore_mode, TS_end_underscore_mode): Removed.
(TS_enter_bold_mode, TS_enter_dim_mode, TS_enter_blink_mode): New.
(TS_enter_reverse_mode): New.
(TS_enter_underline_mode, TS_exit_underline_mode): New.
(TN_magic_cookie_glitch_ul): New.
(TS_enter_alt_charset_mode, TS_exit_alt_charset_mode): New.
(TS_exit_attribute_mode): New.
(TN_max_colors, TN_max_pairs, TS_orig_pairs): New.
(TS_set_foreground, TS_set_background): New.
(reset_terminal_modes): Switch colors back to default.
(write_glyphs): Turn face on before writing text, turn it off
afterwards.
(insert_glyphs): Ditto.
(term_init): Initialize new terminal capability variables.
(turn_on_face): Turn a face on.
(turn_off_face): Turn a face off.
(global): Rewrite for new glyphs.
(TS_end_italic_mode, TS_italic_mode, TS_bold_mode): New variables.
(TS_end_bold_mode, TS_end_underscore_mode): New variables.
(TS_underscore_mode): New variable.
(encode_terminal_code): New function.
(write_glyphs, insert_glyphs): Perform character code conversion
on output to a terminal.
(term_init): Initialize TS_bold_mode, TS_end_bold_mode,
TS_end_underscore_mode, and TS_underscore_mode.