From 337fbd17184a89fb26d9b3752ac2688b500eb761 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 14 May 2009 21:37:02 +0000 Subject: [PATCH] * xfaces.c (tty_supports_face_attributes_p): Recognize unspecified weight when testing attributes (Bug#3282). --- src/ChangeLog | 5 +++++ src/xfaces.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index e4afbc9298a..e5516d26619 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-05-14 Chong Yidong + + * xfaces.c (tty_supports_face_attributes_p): Recognize unspecified + weight when testing attributes (Bug#3282). + 2009-05-11 YAMAMOTO Mitsuharu * gtkutil.c (xg_frame_set_char_size): Set frame pixel width/height to diff --git a/src/xfaces.c b/src/xfaces.c index 152a1d65edd..444376838b9 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -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]); -- 2.39.5