# HG changeset patch # User Eli Zaretskii # Date 972752871 0 # Node ID 87893013088cf82281a1576da3301445fe9bb9d9 # Parent f08f602de169b3422eb01b78b807e95a28d9df52 (Fframe_parameters): Fix the change from 2000-10-16: don't override the colors in frame's param_alist, unless they are unspecified. diff -r f08f602de169 -r 87893013088c src/frame.c --- a/src/frame.c Sat Oct 28 11:22:34 2000 +0000 +++ b/src/frame.c Sat Oct 28 17:07:51 2000 +0000 @@ -2059,21 +2059,31 @@ unspecified and reversed, take the frame's background pixel for foreground and vice versa. */ elt = Fassq (Qforeground_color, alist); - if (!NILP (elt) && CONSP (elt) - && STRINGP (XCDR (elt)) - && strncmp (XSTRING (XCDR (elt))->data, - unspecified_bg, - XSTRING (XCDR (elt))->size) == 0) - store_in_alist (&alist, Qforeground_color, tty_color_name (f, bg)); + if (!NILP (elt) && CONSP (elt) && STRINGP (XCDR (elt))) + { + if (strncmp (XSTRING (XCDR (elt))->data, + unspecified_bg, + XSTRING (XCDR (elt))->size) == 0) + store_in_alist (&alist, Qforeground_color, tty_color_name (f, bg)); + else if (strncmp (XSTRING (XCDR (elt))->data, + unspecified_fg, + XSTRING (XCDR (elt))->size) == 0) + store_in_alist (&alist, Qforeground_color, tty_color_name (f, fg)); + } else store_in_alist (&alist, Qforeground_color, tty_color_name (f, fg)); elt = Fassq (Qbackground_color, alist); - if (!NILP (elt) && CONSP (elt) - && STRINGP (XCDR (elt)) - && strncmp (XSTRING (XCDR (elt))->data, - unspecified_fg, - XSTRING (XCDR (elt))->size) == 0) - store_in_alist (&alist, Qbackground_color, tty_color_name (f, fg)); + if (!NILP (elt) && CONSP (elt) && STRINGP (XCDR (elt))) + { + if (strncmp (XSTRING (XCDR (elt))->data, + unspecified_fg, + XSTRING (XCDR (elt))->size) == 0) + store_in_alist (&alist, Qbackground_color, tty_color_name (f, fg)); + else if (strncmp (XSTRING (XCDR (elt))->data, + unspecified_bg, + XSTRING (XCDR (elt))->size) == 0) + store_in_alist (&alist, Qbackground_color, tty_color_name (f, bg)); + } else store_in_alist (&alist, Qbackground_color, tty_color_name (f, bg)); store_in_alist (&alist, intern ("font"),