From: Kenichi Handa Date: Fri, 9 Feb 2001 12:34:17 +0000 (+0000) Subject: (Finternal_set_lisp_face_attribute): The value of :box X-Git-Tag: emacs-pretest-21.0.98~73 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=89624b8b7c92b7e4b9230990a58c1d3101e60331;p=emacs.git (Finternal_set_lisp_face_attribute): The value of :box and :line-width can be negative. (realize_x_face): The value of attrs[LFACE_BOX_INDEX] can be negative. --- diff --git a/src/xfaces.c b/src/xfaces.c index 64e53fc12d6..c649ec4f784 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -3876,7 +3876,7 @@ FRAME 0 means change the face on all frames, and change the default\n\ else if (NILP (value)) valid_p = 1; else if (INTEGERP (value)) - valid_p = XINT (value) > 0; + valid_p = XINT (value) != 0; else if (STRINGP (value)) valid_p = XSTRING (value)->size > 0; else if (CONSP (value)) @@ -3897,7 +3897,7 @@ FRAME 0 means change the face on all frames, and change the default\n\ if (EQ (k, QCline_width)) { - if (!INTEGERP (v) || XINT (v) <= 0) + if (!INTEGERP (v) || XINT (v) == 0) break; } else if (EQ (k, QCcolor)) @@ -6418,9 +6418,9 @@ realize_x_face (cache, attrs, c, base_face) { /* Simple box of specified line width in foreground color of the face. */ - xassert (XINT (box) > 0); + xassert (XINT (box) != 0); face->box = FACE_SIMPLE_BOX; - face->box_line_width = XFASTINT (box); + face->box_line_width = XINT (box); face->box_color = face->foreground; face->box_color_defaulted_p = 1; } @@ -6447,8 +6447,8 @@ realize_x_face (cache, attrs, c, base_face) if (EQ (keyword, QCline_width)) { - if (INTEGERP (value) && XINT (value) > 0) - face->box_line_width = XFASTINT (value); + if (INTEGERP (value) && XINT (value) != 0) + face->box_line_width = XINT (value); } else if (EQ (keyword, QCcolor)) {