(Finternal_set_lisp_face_attribute): Make null values of :foreground
authorChong Yidong <cyd@stupidchicken.com>
Thu, 16 Oct 2008 16:32:58 +0000 (16:32 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Thu, 16 Oct 2008 16:32:58 +0000 (16:32 +0000)
and :background equivalent to unspecified (20.x compatibility).

src/xfaces.c

index 11e2c3c..68d63d6 100644 (file)
@@ -3217,6 +3217,9 @@ FRAME 0 means change the face on all frames, and change the default
     }
   else if (EQ (attr, QCforeground))
     {
+      /* Compatibility with 20.x.  */
+      if (NILP (value))
+       value = Qunspecified;
       if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
        {
          /* Don't check for valid color names here because it depends
@@ -3231,6 +3234,9 @@ FRAME 0 means change the face on all frames, and change the default
     }
   else if (EQ (attr, QCbackground))
     {
+      /* Compatibility with 20.x.  */
+      if (NILP (value))
+       value = Qunspecified;
       if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
        {
          /* Don't check for valid color names here because it depends