int face_for_overlay_string (struct window *, ptrdiff_t, ptrdiff_t *, ptrdiff_t,
bool, Lisp_Object);
int face_at_string_position (struct window *, Lisp_Object, ptrdiff_t, ptrdiff_t,
- ptrdiff_t *, enum face_id, bool);
+ ptrdiff_t *, enum face_id, bool,
+ enum lface_attribute_index);
int merge_faces (struct window *, Lisp_Object, int, int);
int compute_char_face (struct frame *, int, Lisp_Object);
void free_all_realized_faces (Lisp_Object);
if (STRINGP (string))
face_id = face_at_string_position (w, string, pos, 0, &endptr,
- DEFAULT_FACE_ID, 0);
+ DEFAULT_FACE_ID, false, 0);
else
face_id = face_at_buffer_position (w, pos, &endptr,
pos + 100, false, -1, 0);
: lookup_basic_face (w, f, DEFAULT_FACE_ID);
face_id = face_at_string_position (w, string, pos, 0, &ignore,
- face_id, false);
+ face_id, false, 0);
}
face = FACE_FROM_ID (f, face_id);
}
&next_stop,
(IT_CHARPOS (*it)
+ TEXT_PROP_DISTANCE_LIMIT),
- false, it->base_face_id, attr_filter);
+ false, it->base_face_id,
+ attr_filter);
}
else
{
(IT_CHARPOS (*it)
+ TEXT_PROP_DISTANCE_LIMIT),
false,
- from_overlay);
+ from_overlay);
}
else
{
IT_STRING_CHARPOS (*it),
bufpos,
&next_stop,
- base_face_id, false);
+ base_face_id, false,
+ attr_filter);
} /* !is_string. */
/* Is this a start of a run of characters with box face?
base_face_id = underlying_face_id (it);
/* Get the face for ASCII, or unibyte. */
- face_id = face_at_string_position (it->w,
- it->string,
- charpos,
- bufpos,
- &next_check_charpos,
- base_face_id, false);
+ face_id = face_at_string_position (it->w, it->string, charpos,
+ bufpos, &next_check_charpos,
+ base_face_id, false, 0);
/* Correct the face for charsets different from ASCII. Do it
for the multibyte case only. The face returned above is
next_face_id
= face_at_string_position (it->w, base_string,
CHARPOS (pos), 0,
- &ignore, face_id, false);
+ &ignore, face_id,
+ false, 0);
it->end_of_box_run_p
= (FACE_FROM_ID (it->f, next_face_id)->box
== FACE_NO_BOX);
/* Initialize the iterator IT for iteration over STRING beginning
with index START. */
- reseat_to_string (it, NILP (lisp_string) ? string : NULL, lisp_string, start,
- precision, field_width, multibyte);
+ reseat_to_string (it, NILP (lisp_string) ? string : NULL, lisp_string,
+ start, precision, field_width, multibyte);
if (string && STRINGP (lisp_string))
/* LISP_STRING is the one returned by decode_mode_spec. We should
ignore its text properties. */
it->face_id
= face_at_string_position (it->w, face_string, face_string_pos,
- 0, &endptr, it->base_face_id, false);
+ 0, &endptr, it->base_face_id, false, 0);
face = FACE_FROM_ID (it->f, it->face_id);
it->face_box_p = face->box != FACE_NO_BOX;
}
hlinfo->mouse_face_past_end = false;
hlinfo->mouse_face_window = window;
- hlinfo->mouse_face_face_id = face_at_string_position (w, string,
- charpos,
- 0, &ignore,
- glyph->face_id,
- true);
+ hlinfo->mouse_face_face_id =
+ face_at_string_position (w, string, charpos, 0, &ignore,
+ glyph->face_id, true, 0);
+
show_mouse_face (hlinfo, DRAW_MOUSE_FACE);
mouse_face_shown = true;
hlinfo->mouse_face_window = window;
hlinfo->mouse_face_face_id
= face_at_string_position (w, object, pos, 0, &ignore,
- glyph->face_id, true);
+ glyph->face_id, true, 0);
show_mouse_face (hlinfo, DRAW_MOUSE_FACE);
cursor = No_Cursor;
}
int
face_at_string_position (struct window *w, Lisp_Object string,
- ptrdiff_t pos, ptrdiff_t bufpos,
- ptrdiff_t *endptr, enum face_id base_face_id,
- bool mouse_p)
+ ptrdiff_t pos, ptrdiff_t bufpos,
+ ptrdiff_t *endptr, enum face_id base_face_id,
+ bool mouse_p,
+ enum lface_attribute_index attr_filter)
{
Lisp_Object prop, position, end, limit;
struct frame *f = XFRAME (WINDOW_FRAME (w));
/* Merge in attributes specified via text properties. */
if (!NILP (prop))
- merge_face_ref (w, f, prop, attrs, true, NULL, 0);
+ merge_face_ref (w, f, prop, attrs, true, NULL, attr_filter);
/* Look up a realized face with the given face attributes,
or realize a new one for ASCII characters. */