--- xfaces.c.~1.252.~ Sat Apr 27 17:21:17 2002 +++ xfaces.c Wed May 8 04:28:14 2002 @@ -388,6 +388,10 @@ Lisp_Object Vface_ignored_fonts; +/* If non-nil, ignore face text properties */ + +Lisp_Object Vinhibit_text_property_faces; + /* Maximum number of fonts to consider in font_list. If not an integer > 0, DEFAULT_FONT_LIST_LIMIT is used instead. */ @@ -6809,7 +6813,7 @@ { struct frame *f = XFRAME (w->frame); Lisp_Object attrs[LFACE_VECTOR_SIZE]; - Lisp_Object prop, position; + Lisp_Object prop = Qnil, position; int i, noverlays; Lisp_Object *overlay_vec; Lisp_Object frame; @@ -6829,13 +6833,16 @@ if (pos < region_beg && region_beg < endpos) endpos = region_beg; - /* Get the `face' or `mouse_face' text property at POS, and - determine the next position at which the property changes. */ - prop = Fget_text_property (position, propname, w->buffer); - XSETFASTINT (limit1, (limit < endpos ? limit : endpos)); - end = Fnext_single_property_change (position, propname, w->buffer, limit1); - if (INTEGERP (end)) - endpos = XINT (end); + if (EQ(propname, Qface) && NILP(Vinhibit_text_property_faces)) + { + /* Get the `face' or `mouse_face' text property at POS, and + determine the next position at which the property changes. */ + prop = Fget_text_property (position, propname, w->buffer); + XSETFASTINT (limit1, (limit < endpos ? limit : endpos)); + end = Fnext_single_property_change (position, propname, w->buffer, limit1); + if (INTEGERP (end)) + endpos = XINT (end); + } /* Look at properties from overlays. */ { @@ -7321,6 +7328,10 @@ Each element is a regular expression that matches names of fonts to ignore. */); Vface_ignored_fonts = Qnil; + + DEFVAR_LISP ("inhibit-text-property-faces", &Vinhibit_text_property_faces, + doc: /* If non-nil, then a `face' text property will be ignored. */); + Vinhibit_text_property_faces = Qnil; #ifdef HAVE_WINDOW_SYSTEM defsubr (&Sbitmap_spec_p);