Document buffer-local-value.
[bpt/emacs.git] / src / buffer.h
index bc15a06..c90b12f 100644 (file)
@@ -1,5 +1,6 @@
 /* Header file for the buffer manipulation primitives.
-   Copyright (C) 1985, 86, 93, 94, 95, 97, 1998, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1985, 86, 93, 94, 95, 97, 1998, 1999, 2000, 2001
+   Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -180,8 +181,9 @@ Boston, MA 02111-1307, USA.  */
 #define BUF_COMPUTE_UNCHANGED(buf, start, end)                         \
   do                                                                   \
     {                                                                  \
-      if (BUF_UNCHANGED_MODIFIED (buf) == MODIFF                       \
-         && BUF_OVERLAY_UNCHANGED_MODIFIED (buf) == OVERLAY_MODIFF)    \
+      if (BUF_UNCHANGED_MODIFIED (buf) == BUF_MODIFF (buf)             \
+         && (BUF_OVERLAY_UNCHANGED_MODIFIED (buf)                      \
+             == BUF_OVERLAY_MODIFF (buf)))                             \
        {                                                               \
          BUF_BEG_UNCHANGED (buf) = (start) - BUF_BEG (buf);            \
          BUF_END_UNCHANGED (buf) = BUF_Z (buf) - (end);                \
@@ -216,6 +218,7 @@ extern void set_point P_ ((struct buffer *, int));
 extern INLINE void temp_set_point P_ ((struct buffer *, int));
 extern void set_point_both P_ ((struct buffer *, int, int));
 extern INLINE void temp_set_point_both P_ ((struct buffer *, int, int));
+extern void enlarge_buffer_text P_ ((struct buffer *, int));
 
 \f
 /* Macros for setting the BEGV, ZV or PT of a given buffer.
@@ -253,7 +256,7 @@ extern INLINE void temp_set_point_both P_ ((struct buffer *, int, int));
    These macros do not check that the position is in range.  */
 
 /* Access a Lisp position value in POS,
-   and store the charpos in CHARPOS and the bypepos in BYPEPOS.  */
+   and store the charpos in CHARPOS and the bytepos in BYTEPOS.  */
 
 #define DECODE_POSITION(charpos, bytepos, pos)                 \
 if (1)                                                         \
@@ -423,8 +426,8 @@ struct buffer_text
        end_unchanged contain no useful information.  */
     int overlay_unchanged_modified;
 
-    /* Properties of this buffer's text -- conditionally compiled.  */
-    DECLARE_INTERVALS
+    /* Properties of this buffer's text.  */
+    INTERVAL intervals;
 
     /* The markers that refer to this buffer.
        This is actually a single marker ---
@@ -788,7 +791,7 @@ extern struct buffer buffer_local_types;
 \f
 extern void reset_buffer P_ ((struct buffer *));
 extern void evaporate_overlays P_ ((int));
-extern int overlays_at P_ ((int, int, Lisp_Object **, int *, int *, int *));
+extern int overlays_at P_ ((int, int, Lisp_Object **, int *, int *, int *, int));
 extern int sort_overlays P_ ((Lisp_Object *, int, struct window *));
 extern void recenter_overlay_lists P_ ((struct buffer *, int));
 extern int overlay_strings P_ ((int, struct window *, unsigned char **));
@@ -799,7 +802,7 @@ extern void set_buffer_temp P_ ((struct buffer *));
 extern void record_buffer P_ ((Lisp_Object));
 extern void buffer_slot_type_mismatch P_ ((int));
 extern void fix_overlays_before P_ ((struct buffer *, int, int));
-
+extern void mmap_set_vars P_ ((int));
 
 EXFUN (Fbuffer_name, 1);
 EXFUN (Fget_file_buffer, 1);
@@ -807,8 +810,6 @@ EXFUN (Fnext_overlay_change, 1);
 EXFUN (Fdelete_overlay, 1);
 
 /* Functions to call before and after each text change.  */
-extern Lisp_Object Vbefore_change_function;
-extern Lisp_Object Vafter_change_function;
 extern Lisp_Object Vbefore_change_functions;
 extern Lisp_Object Vafter_change_functions;
 extern Lisp_Object Vfirst_change_hook;
@@ -825,41 +826,28 @@ extern Lisp_Object Vtransient_mark_mode;
 /* Overlays */
 
 /* 1 if the OV is an overlay object.  */
+
 #define OVERLAY_VALID(OV) (OVERLAYP (OV))
 
 /* Return the marker that stands for where OV starts in the buffer.  */
+
 #define OVERLAY_START(OV) (XOVERLAY (OV)->start)
 
 /* Return the marker that stands for where OV ends in the buffer.  */
+
 #define OVERLAY_END(OV) (XOVERLAY (OV)->end)
 
+/* Return the plist of overlay OV.  */
+
+#define OVERLAY_PLIST(OV) XOVERLAY ((OV))->plist
+
 /* Return the actual buffer position for the marker P.
    We assume you know which buffer it's pointing into.  */
 
 #define OVERLAY_POSITION(P) \
  (GC_MARKERP (P) ? marker_position (P) : (abort (), 0))
 
-/* Allocation of buffer text.  */
-
-#ifdef REL_ALLOC
-
-extern char *r_alloc P_ ((char **, unsigned long));
-extern void r_alloc_free P_ ((char **ptr));
-extern char *r_re_alloc P_ ((char **, unsigned long));
-
-#define BUFFER_ALLOC(data,size) \
-     ((unsigned char *) r_alloc ((char **)&data, (size)))
-#define BUFFER_REALLOC(data,size) \
-     ((unsigned char *) r_re_alloc ((char **) &data, (size)))
-#define BUFFER_FREE(data) (r_alloc_free ((char **) &data))
-#define R_ALLOC_DECLARE(var,data) (r_alloc_declare (&var, (data)))
-#else
-#define BUFFER_ALLOC(data,size) (data = (unsigned char *) malloc ((size)))
-#define BUFFER_REALLOC(data,size) ((unsigned char *) realloc ((data), (size)))
-#define BUFFER_FREE(data) (free ((data)))
-#define R_ALLOC_DECLARE(var,data)
-#endif
-
+\f
 /***********************************************************************
                        Buffer-local Variables
  ***********************************************************************/