]> code.delx.au - gnu-emacs/commitdiff
(Fframe_parameters): Fix the change from 2000-10-16:
authorEli Zaretskii <eliz@gnu.org>
Sat, 28 Oct 2000 17:07:51 +0000 (17:07 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 28 Oct 2000 17:07:51 +0000 (17:07 +0000)
don't override the colors in frame's param_alist, unless they are
unspecified.

src/frame.c

index d495846fcdff12b5dad2c0a990eba61ae7ecc6ab..644e7a5347a6c634fba4194550bb05f4bf575dd1 100644 (file)
@@ -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"),