changeset 58440:9c19dd9a3b68

(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.
author Kim F. Storm <storm@cua.dk>
date Mon, 22 Nov 2004 23:26:02 +0000
parents b1e7465ce5fc
children 9b7ff064cb26
files src/xdisp.c
diffstat 1 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Mon Nov 22 23:25:49 2004 +0000
+++ b/src/xdisp.c	Mon Nov 22 23:26:02 2004 +0000
@@ -3575,7 +3575,7 @@
 	      || 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 @@
 	  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 @@
 		  && 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 @@
       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);