# HG changeset patch # User Kim F. Storm # Date 1084833994 0 # Node ID 10e402439453177903abbcf4db35dc3e8dccd2c4 # Parent a9c3a4a0ef8f73464d0ab69c23b9e70a39e60651 (GET_OVERLAYS_AT): New macro. diff -r a9c3a4a0ef8f -r 10e402439453 src/buffer.h --- a/src/buffer.h Mon May 17 22:29:59 2004 +0000 +++ b/src/buffer.h Mon May 17 22:46:34 2004 +0000 @@ -823,6 +823,25 @@ extern void fix_overlays_before P_ ((struct buffer *, EMACS_INT, EMACS_INT)); extern void mmap_set_vars P_ ((int)); +/* Get overlays at POSN into array OVERLAYS with NOVERLAYS elements. + If NEXTP is non-NULL, return next overlay there. + See overlay_at arg CHANGE_REQ for meaning of CHRQ arg. */ + +#define GET_OVERLAYS_AT(posn, overlays, noverlays, nextp, chrq) \ + do { \ + int maxlen = 40; \ + overlays = (Lisp_Object *) alloca (maxlen * sizeof (Lisp_Object)); \ + noverlays = overlays_at (posn, 0, &overlays, &maxlen, \ + nextp, NULL, chrq); \ + if (noverlays > maxlen) \ + { \ + maxlen = noverlays; \ + overlays = (Lisp_Object *) alloca (maxlen * sizeof (Lisp_Object)); \ + noverlays = overlays_at (posn, 0, &overlays, &maxlen, \ + nextp, NULL, chrq); \ + } \ + } while (0) + EXFUN (Fbuffer_name, 1); EXFUN (Fget_file_buffer, 1); EXFUN (Fnext_overlay_change, 1);