Mercurial > emacs
comparison src/frame.c @ 33005:87893013088c
(Fframe_parameters): Fix the change from 2000-10-16:
don't override the colors in frame's param_alist, unless they are
unspecified.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 28 Oct 2000 17:07:51 +0000 |
parents | 44cb0900a858 |
children | a7d245e080d1 |
comparison
equal
deleted
inserted
replaced
33004:f08f602de169 | 33005:87893013088c |
---|---|
2057 | 2057 |
2058 /* If the frame's parameter alist says the colors are | 2058 /* If the frame's parameter alist says the colors are |
2059 unspecified and reversed, take the frame's background pixel | 2059 unspecified and reversed, take the frame's background pixel |
2060 for foreground and vice versa. */ | 2060 for foreground and vice versa. */ |
2061 elt = Fassq (Qforeground_color, alist); | 2061 elt = Fassq (Qforeground_color, alist); |
2062 if (!NILP (elt) && CONSP (elt) | 2062 if (!NILP (elt) && CONSP (elt) && STRINGP (XCDR (elt))) |
2063 && STRINGP (XCDR (elt)) | 2063 { |
2064 && strncmp (XSTRING (XCDR (elt))->data, | 2064 if (strncmp (XSTRING (XCDR (elt))->data, |
2065 unspecified_bg, | 2065 unspecified_bg, |
2066 XSTRING (XCDR (elt))->size) == 0) | 2066 XSTRING (XCDR (elt))->size) == 0) |
2067 store_in_alist (&alist, Qforeground_color, tty_color_name (f, bg)); | 2067 store_in_alist (&alist, Qforeground_color, tty_color_name (f, bg)); |
2068 else if (strncmp (XSTRING (XCDR (elt))->data, | |
2069 unspecified_fg, | |
2070 XSTRING (XCDR (elt))->size) == 0) | |
2071 store_in_alist (&alist, Qforeground_color, tty_color_name (f, fg)); | |
2072 } | |
2068 else | 2073 else |
2069 store_in_alist (&alist, Qforeground_color, tty_color_name (f, fg)); | 2074 store_in_alist (&alist, Qforeground_color, tty_color_name (f, fg)); |
2070 elt = Fassq (Qbackground_color, alist); | 2075 elt = Fassq (Qbackground_color, alist); |
2071 if (!NILP (elt) && CONSP (elt) | 2076 if (!NILP (elt) && CONSP (elt) && STRINGP (XCDR (elt))) |
2072 && STRINGP (XCDR (elt)) | 2077 { |
2073 && strncmp (XSTRING (XCDR (elt))->data, | 2078 if (strncmp (XSTRING (XCDR (elt))->data, |
2074 unspecified_fg, | 2079 unspecified_fg, |
2075 XSTRING (XCDR (elt))->size) == 0) | 2080 XSTRING (XCDR (elt))->size) == 0) |
2076 store_in_alist (&alist, Qbackground_color, tty_color_name (f, fg)); | 2081 store_in_alist (&alist, Qbackground_color, tty_color_name (f, fg)); |
2082 else if (strncmp (XSTRING (XCDR (elt))->data, | |
2083 unspecified_bg, | |
2084 XSTRING (XCDR (elt))->size) == 0) | |
2085 store_in_alist (&alist, Qbackground_color, tty_color_name (f, bg)); | |
2086 } | |
2077 else | 2087 else |
2078 store_in_alist (&alist, Qbackground_color, tty_color_name (f, bg)); | 2088 store_in_alist (&alist, Qbackground_color, tty_color_name (f, bg)); |
2079 store_in_alist (&alist, intern ("font"), | 2089 store_in_alist (&alist, intern ("font"), |
2080 build_string (FRAME_MSDOS_P (f) | 2090 build_string (FRAME_MSDOS_P (f) |
2081 ? "ms-dos" | 2091 ? "ms-dos" |