2734 |
int noverlays; |
int noverlays; |
2735 |
int endpos; |
int endpos; |
2736 |
Lisp_Object *overlays; |
Lisp_Object *overlays; |
|
int len; |
|
2737 |
int i; |
int i; |
2738 |
|
|
2739 |
/* Get all overlays at the given position. */ |
/* Get all overlays at the given position. */ |
2740 |
len = 10; |
GET_OVERLAYS_AT (pos, overlays, noverlays, &endpos, 1); |
|
overlays = (Lisp_Object *) alloca (len * sizeof *overlays); |
|
|
noverlays = overlays_at (pos, 0, &overlays, &len, &endpos, NULL, 1); |
|
|
if (noverlays > len) |
|
|
{ |
|
|
len = noverlays; |
|
|
overlays = (Lisp_Object *) alloca (len * sizeof *overlays); |
|
|
noverlays = overlays_at (pos, 0, &overlays, &len, &endpos, NULL, 1); |
|
|
} |
|
2741 |
|
|
2742 |
/* If any of these overlays ends before endpos, |
/* If any of these overlays ends before endpos, |
2743 |
use its ending point instead. */ |
use its ending point instead. */ |
20825 |
Lisp_Object object; |
Lisp_Object object; |
20826 |
Lisp_Object mouse_face = Qnil, overlay = Qnil, position; |
Lisp_Object mouse_face = Qnil, overlay = Qnil, position; |
20827 |
Lisp_Object *overlay_vec = NULL; |
Lisp_Object *overlay_vec = NULL; |
20828 |
int len, noverlays; |
int noverlays; |
20829 |
struct buffer *obuf; |
struct buffer *obuf; |
20830 |
int obegv, ozv, same_region; |
int obegv, ozv, same_region; |
20831 |
|
|
20912 |
|
|
20913 |
if (BUFFERP (object)) |
if (BUFFERP (object)) |
20914 |
{ |
{ |
20915 |
/* Put all the overlays we want in a vector in overlay_vec. |
/* Put all the overlays we want in a vector in overlay_vec. */ |
20916 |
Store the length in len. If there are more than 40, make |
GET_OVERLAYS_AT (pos, overlay_vec, noverlays, NULL, 0); |
|
enough space for all, and try again. */ |
|
|
len = 40; |
|
|
overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object)); |
|
|
noverlays = overlays_at (pos, 0, &overlay_vec, &len, NULL, NULL, 0); |
|
|
if (noverlays > len) |
|
|
{ |
|
|
len = noverlays; |
|
|
overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object)); |
|
|
noverlays = overlays_at (pos, 0, &overlay_vec, &len, NULL, NULL,0); |
|
|
} |
|
|
|
|
20917 |
/* Sort overlays into increasing priority order. */ |
/* Sort overlays into increasing priority order. */ |
20918 |
noverlays = sort_overlays (overlay_vec, noverlays, w); |
noverlays = sort_overlays (overlay_vec, noverlays, w); |
20919 |
} |
} |