diff options
Diffstat (limited to 'src/xfaces.c')
| -rw-r--r-- | src/xfaces.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/xfaces.c b/src/xfaces.c index ac44f3317ce..2bd3f31d6ea 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -7297,24 +7297,8 @@ face_at_buffer_position (w, pos, region_beg, region_end, | |||
| 7297 | /* Look at properties from overlays. */ | 7297 | /* Look at properties from overlays. */ |
| 7298 | { | 7298 | { |
| 7299 | int next_overlay; | 7299 | int next_overlay; |
| 7300 | int len; | ||
| 7301 | |||
| 7302 | /* First try with room for 40 overlays. */ | ||
| 7303 | len = 40; | ||
| 7304 | overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object)); | ||
| 7305 | noverlays = overlays_at (pos, 0, &overlay_vec, &len, | ||
| 7306 | &next_overlay, NULL, 0); | ||
| 7307 | |||
| 7308 | /* If there are more than 40, make enough space for all, and try | ||
| 7309 | again. */ | ||
| 7310 | if (noverlays > len) | ||
| 7311 | { | ||
| 7312 | len = noverlays; | ||
| 7313 | overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object)); | ||
| 7314 | noverlays = overlays_at (pos, 0, &overlay_vec, &len, | ||
| 7315 | &next_overlay, NULL, 0); | ||
| 7316 | } | ||
| 7317 | 7300 | ||
| 7301 | GET_OVERLAYS_AT (pos, overlay_vec, noverlays, &next_overlay, 0); | ||
| 7318 | if (next_overlay < endpos) | 7302 | if (next_overlay < endpos) |
| 7319 | endpos = next_overlay; | 7303 | endpos = next_overlay; |
| 7320 | } | 7304 | } |