mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-25 23:10:47 -08:00
(face_at_buffer_position): Use GET_OVERLAYS_AT.
This commit is contained in:
parent
7994a99147
commit
0bc90bbad4
2 changed files with 11 additions and 17 deletions
|
|
@ -1,3 +1,13 @@
|
|||
2004-05-18 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* buffer.h (GET_OVERLAYS_AT): New macro.
|
||||
* msdos.c (IT_note_mouse_highlight): Use it.
|
||||
* textprop.c (get_char_property_and_overlay): Use it.
|
||||
* xdisp.c (next_overlay_change, note_mouse_highlight): Use it.
|
||||
* xfaces.c (face_at_buffer_position): Use it.
|
||||
|
||||
* print.c (print_object): Increase buf size.
|
||||
|
||||
2004-05-17 Kim F. Storm <storm@cua.dk>
|
||||
|
||||
* alloc.c (mark_object): Ignore Lisp_Misc_Free objects.
|
||||
|
|
|
|||
18
src/xfaces.c
18
src/xfaces.c
|
|
@ -7297,24 +7297,8 @@ face_at_buffer_position (w, pos, region_beg, region_end,
|
|||
/* Look at properties from overlays. */
|
||||
{
|
||||
int next_overlay;
|
||||
int len;
|
||||
|
||||
/* First try with room for 40 overlays. */
|
||||
len = 40;
|
||||
overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object));
|
||||
noverlays = overlays_at (pos, 0, &overlay_vec, &len,
|
||||
&next_overlay, NULL, 0);
|
||||
|
||||
/* If there are more than 40, make enough space for all, and try
|
||||
again. */
|
||||
if (noverlays > len)
|
||||
{
|
||||
len = noverlays;
|
||||
overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object));
|
||||
noverlays = overlays_at (pos, 0, &overlay_vec, &len,
|
||||
&next_overlay, NULL, 0);
|
||||
}
|
||||
|
||||
GET_OVERLAYS_AT (pos, overlay_vec, noverlays, &next_overlay, 0);
|
||||
if (next_overlay < endpos)
|
||||
endpos = next_overlay;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue