(mode-line, header-line, tool-bar): Same default as x for w32.
(fixed-pitch, variable-pitch): Remove wildcard as it prevents
face-font-family-alternatives from working.
(set-face-attribute): Purecopy args.
(read-face-name): Default to name at point and use it in prompt.
Remove colon from arg in all callers.
(list-faces-display): Hyperlink to face descriptions and customize
buffers.
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.
* term/pc-win.el (msdos-setup-initial-frame): New function, run by
term-setup-hook. Call msdos-remember-default-colors and
msdos-handle-reverse-video.
(msdos-face-setup): Parts of code moved to
msdos-setup-initial-frame.
(msdos-handle-reverse-video): New function, modeled after
x-handle-reverse-video.
(make-msdos-frame): Don't use initial-frame-alist and
default-frame-alist. Call msdos-handle-reverse-video.
(msdos-color-aliases): Remove.
(msdos-color-translate, msdos-approximate-color): Remove.
(msdos-color-values): Use 16-bit RGB values. RGB values updated
for better approximation of X colors.
(msdos-face-setup): Call tty-color-clear. Remove code that sets
up tty-color-alist (it is now on startup.el).
(x-display-color-p, x-color-defined-p, x-color-values,
x-defined-colors, face-color-supported-p, face-color-gray-p):
Remove.
* facemenu.el (facemenu-read-color, list-colors-display): Use
defined-colors for all frame types.
(facemenu-color-equal): Use color-values for all frame types.
* faces.el (read-face-attribute): For :foreground and :background
attributes and frames on character terminals, translate the color
to the closest supported one before looking it up in the list of
valid values.
(face-valid-attribute-values): Call defined-colors for all types
of frames.
(defined-colors, color-defined-p, color-values, display-color-p):
New finctions.
(x-defined-colors, x-color-defined-p, x-color-values,
x-display-color-p): Aliases for the above.
* startup.el (command-line): Register terminal colors for frame
types other than x and w32, but only if the terminal supports
colors. Call tty-color-define instead of face-register-tty-color.
* term/x-win.el (xw-defined-colors): Renamed from
x-defined-colors.
* term/w32-win.el (xw-defined-colors): Likewise.
* term/tty-colors.el: New file.
* loadup.el: Load term/tty-colors.
families on ttys.
(face-read-integer): Handle unspecified face attributes. Add
completion for `unspecified'.
(read-face-attribute): Handle unspecified font attributes.
(face-valid-attribute-values): Add `unspecified' to lists so that
it can be chosen via completion.
(face-read-string): Don't recognize "none" as input.