From ff7d52cda4bae5a44de9156916e58482fc0480f5 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 22 Nov 2004 23:26:02 +0000 Subject: [PATCH] (handle_single_display_prop): Don't signal error in lookup_named_face for unknown fringe face name. (highlight_trailing_whitespace): Don't signal error in lookup_named_face if trailing-whitespace face unknown. (calc_line_height_property): Don't signal error in lookup_named_face if specified face name is unknown. --- src/xdisp.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 3b7b9d39f81..d13f89ad27b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -3575,7 +3575,7 @@ handle_single_display_prop (it, prop, object, position, || EQ (XCAR (prop), Qright_fringe)) && CONSP (XCDR (prop))) { - unsigned face_id = DEFAULT_FACE_ID; + int face_id = DEFAULT_FACE_ID; int fringe_bitmap; /* Save current settings of IT so that we can restore them @@ -3594,10 +3594,9 @@ handle_single_display_prop (it, prop, object, position, if (CONSP (XCDR (XCDR (prop)))) { Lisp_Object face_name = XCAR (XCDR (XCDR (prop))); - - face_id = lookup_named_face (it->f, face_name, 'A'); - if (face_id < 0) - return 0; + int face_id2 = lookup_named_face (it->f, face_name, 'A', 0); + if (face_id2 >= 0) + face_id = face_id2; } push_it (it); @@ -14534,7 +14533,9 @@ highlight_trailing_whitespace (f, row) && glyph->u.ch == ' ')) && trailing_whitespace_p (glyph->charpos)) { - int face_id = lookup_named_face (f, Qtrailing_whitespace, 0); + int face_id = lookup_named_face (f, Qtrailing_whitespace, 0, 0); + if (face_id < 0) + return; while (glyph >= start && BUFFERP (glyph->object) @@ -18808,7 +18809,7 @@ calc_line_height_property (it, prop, font, boff, total) struct face *face; struct font_info *font_info; - face_id = lookup_named_face (it->f, face_name, ' '); + face_id = lookup_named_face (it->f, face_name, ' ', 0); if (face_id < 0) return make_number (-1); -- 2.39.5