changeset 27114:4efa5e54e9a9

(Qunspecified_fg, Qunspecified_bg): Remove. (syms_of_xfaces): Remove their staticpro's. (tty_color_name): Return Lisp strings for unspecified fore- and back-ground colors. (Finternal_set_lisp_face_attribute): Remove the special treatment for Qunspecified_{f,b}g. (realize_default_face): Replace Qunspecified_{f,b}g with a Lisp string.
author Eli Zaretskii <eliz@gnu.org>
date Mon, 03 Jan 2000 16:52:52 +0000
parents 21f49fa0782b
children 13a2c64e6ade
files src/xfaces.c
diffstat 1 files changed, 12 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfaces.c	Mon Jan 03 15:56:05 2000 +0000
+++ b/src/xfaces.c	Mon Jan 03 16:52:52 2000 +0000
@@ -282,7 +282,9 @@
 Lisp_Object Qultra_expanded;
 Lisp_Object Qreleased_button, Qpressed_button;
 Lisp_Object QCstyle, QCcolor, QCline_width;
-Lisp_Object Qunspecified, Qunspecified_fg, Qunspecified_bg;
+Lisp_Object Qunspecified;
+
+char unspecified_fg[] = "unspecified-fg", unspecified_bg[] = "unspecified-bg";
 
 /* The symbol `x-charset-registry'.  This property of charsets defines
    the X registry and encoding that fonts should have that are used to
@@ -1194,10 +1196,11 @@
      by index using the default color mapping on a Windows console.  */
 #endif
 
-  return
-    idx == FACE_TTY_DEFAULT_FG_COLOR ? Qunspecified_fg
-    : idx == FACE_TTY_DEFAULT_BG_COLOR ? Qunspecified_bg
-    : Qunspecified;
+  if (idx == FACE_TTY_DEFAULT_FG_COLOR)
+    return build_string (unspecified_fg);
+  if (idx == FACE_TTY_DEFAULT_BG_COLOR)
+    return build_string (unspecified_bg);
+  return Qunspecified;
 }
 
 /* Return non-zero if COLOR_NAME is a shade of gray (or white or
@@ -3445,8 +3448,7 @@
     }
   else if (EQ (attr, QCforeground))
     {
-      if (!UNSPECIFIEDP (value)
-	  && !EQ (value, Qunspecified_fg) && !EQ (value, Qunspecified_bg))
+      if (!UNSPECIFIEDP (value))
 	{
 	  /* Don't check for valid color names here because it depends
 	     on the frame (display) whether the color will be valid
@@ -3460,8 +3462,7 @@
     }
   else if (EQ (attr, QCbackground))
     {
-      if (!UNSPECIFIEDP (value)
-	  && !EQ (value, Qunspecified_bg) && !EQ (value, Qunspecified_fg))
+      if (!UNSPECIFIEDP (value))
 	{
 	  /* Don't check for valid color names here because it depends
 	     on the frame (display) whether the color will be valid
@@ -5707,7 +5708,7 @@
       else if (FRAME_X_P (f))
 	return 0;
       else if (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f))
-	LFACE_FOREGROUND (lface) = Qunspecified_fg;
+	LFACE_FOREGROUND (lface) = build_string (unspecified_fg);
       else
 	abort ();
     }
@@ -5722,7 +5723,7 @@
       else if (FRAME_X_P (f))
 	return 0;
       else if (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f))
-	LFACE_BACKGROUND (lface) = Qunspecified_bg;
+	LFACE_BACKGROUND (lface) = build_string (unspecified_bg);
       else
 	abort ();
     }
@@ -6662,10 +6663,6 @@
   staticpro (&Qforeground_color);
   Qunspecified = intern ("unspecified");
   staticpro (&Qunspecified);
-  Qunspecified_fg = intern ("unspecified-fg");
-  staticpro (&Qunspecified_fg);
-  Qunspecified_bg = intern ("unspecified-bg");
-  staticpro (&Qunspecified_bg);
 
   Qx_charset_registry = intern ("x-charset-registry");
   staticpro (&Qx_charset_registry);