From: Eli Zaretskii Date: Sat, 28 Oct 2000 17:07:51 +0000 (+0000) Subject: (Fframe_parameters): Fix the change from 2000-10-16: X-Git-Tag: emacs-pretest-21.0.90~468 X-Git-Url: https://code.delx.au/gnu-emacs/commitdiff_plain/70de9f065a0515b43137df5a62a9d4b151c53bdf (Fframe_parameters): Fix the change from 2000-10-16: don't override the colors in frame's param_alist, unless they are unspecified. --- diff --git a/src/frame.c b/src/frame.c index d495846fcd..644e7a5347 100644 --- a/src/frame.c +++ b/src/frame.c @@ -2059,21 +2059,31 @@ If FRAME is omitted, return information on the currently selected frame.") 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"),