From: Chong Yidong Date: Thu, 14 May 2009 21:37:02 +0000 (+0000) Subject: * xfaces.c (tty_supports_face_attributes_p): Recognize unspecified X-Git-Tag: emacs-pretest-23.0.94~46 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=337fbd17184a89fb26d9b3752ac2688b500eb761;p=emacs.git * xfaces.c (tty_supports_face_attributes_p): Recognize unspecified weight when testing attributes (Bug#3282). --- 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]);