Mercurial > emacs
changeset 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 | f08f602de169 |
children | c0a3490a2554 |
files | src/frame.c |
diffstat | 1 files changed, 22 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- 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"),