]> code.delx.au - gnu-emacs/commitdiff
* xfaces.c (tty_supports_face_attributes_p): Recognize unspecified
authorChong Yidong <cyd@stupidchicken.com>
Thu, 14 May 2009 21:37:02 +0000 (21:37 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Thu, 14 May 2009 21:37:02 +0000 (21:37 +0000)
weight when testing attributes (Bug#3282).

src/ChangeLog
src/xfaces.c

index e4afbc9298a5874de4b1decaa95385272565bdf1..e5516d26619827912284e7f3dc3ce033194ed54c 100644 (file)
@@ -1,3 +1,8 @@
+2009-05-14  Chong Yidong  <cyd@stupidchicken.com>
+
+       * xfaces.c (tty_supports_face_attributes_p): Recognize unspecified
+       weight when testing attributes (Bug#3282).
+
 2009-05-11  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
        * gtkutil.c (xg_frame_set_char_size): Set frame pixel width/height to
index 152a1d65edddb526467d094e0a99cfdbda6a42a5..444376838b956de69511bfe40670ea7e3ea7cbaa 100644 (file)
@@ -5175,8 +5175,9 @@ tty_supports_face_attributes_p (f, attrs, def_face)
   /* Test for terminal `capabilities' (non-color character attributes).  */
 
   /* font weight (bold/dim) */
-  weight = FONT_WEIGHT_NAME_NUMERIC (attrs[LFACE_WEIGHT_INDEX]);
-  if (weight >= 0)
+  val = attrs[LFACE_WEIGHT_INDEX];
+  if (!UNSPECIFIEDP (val)
+      && (weight = FONT_WEIGHT_NAME_NUMERIC (val), weight >= 0))
     {
       int def_weight = FONT_WEIGHT_NAME_NUMERIC (def_attrs[LFACE_WEIGHT_INDEX]);