aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.h
diff options
context:
space:
mode:
authorKim F. Storm2004-05-17 22:46:34 +0000
committerKim F. Storm2004-05-17 22:46:34 +0000
commit002571ddc7980f54ec0cd5a8c42adff41f3b5f76 (patch)
tree4bb10a110e22004430367e5eaf730939165b2bc4 /src/buffer.h
parentff999ce63e64526f244a54b8016dd68d5f748dc7 (diff)
downloademacs-002571ddc7980f54ec0cd5a8c42adff41f3b5f76.tar.gz
emacs-002571ddc7980f54ec0cd5a8c42adff41f3b5f76.zip
(GET_OVERLAYS_AT): New macro.
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/buffer.h b/src/buffer.h
index e2205a916e6..b5227cb9981 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -823,6 +823,25 @@ extern void buffer_slot_type_mismatch P_ ((int));
823extern void fix_overlays_before P_ ((struct buffer *, EMACS_INT, EMACS_INT)); 823extern void fix_overlays_before P_ ((struct buffer *, EMACS_INT, EMACS_INT));
824extern void mmap_set_vars P_ ((int)); 824extern void mmap_set_vars P_ ((int));
825 825
826/* Get overlays at POSN into array OVERLAYS with NOVERLAYS elements.
827 If NEXTP is non-NULL, return next overlay there.
828 See overlay_at arg CHANGE_REQ for meaning of CHRQ arg. */
829
830#define GET_OVERLAYS_AT(posn, overlays, noverlays, nextp, chrq) \
831 do { \
832 int maxlen = 40; \
833 overlays = (Lisp_Object *) alloca (maxlen * sizeof (Lisp_Object)); \
834 noverlays = overlays_at (posn, 0, &overlays, &maxlen, \
835 nextp, NULL, chrq); \
836 if (noverlays > maxlen) \
837 { \
838 maxlen = noverlays; \
839 overlays = (Lisp_Object *) alloca (maxlen * sizeof (Lisp_Object)); \
840 noverlays = overlays_at (posn, 0, &overlays, &maxlen, \
841 nextp, NULL, chrq); \
842 } \
843 } while (0)
844
826EXFUN (Fbuffer_name, 1); 845EXFUN (Fbuffer_name, 1);
827EXFUN (Fget_file_buffer, 1); 846EXFUN (Fget_file_buffer, 1);
828EXFUN (Fnext_overlay_change, 1); 847EXFUN (Fnext_overlay_change, 1);