/* Header file for the buffer manipulation primitives.
- Copyright (C) 1985, 86, 93, 94, 95, 97, 1998, 1999, 2000 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.
#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); \
while (0)
\f
-/* Macros to set PT in the current buffer, or another buffer.. */
+/* Macros to set PT in the current buffer, or another buffer. */
#define SET_PT(position) (set_point (current_buffer, (position)))
#define TEMP_SET_PT(position) (temp_set_point (current_buffer, (position)))
0 means visited file modtime unknown; in no case complain
about any mismatch on next save attempt. */
int modtime;
- /* the value of text->modiff at the last auto-save. */
+ /* The value of text->modiff at the last auto-save. */
int auto_save_modified;
+ /* The value of text->modiff at the last display error.
+ Redisplay of this buffer is inhibited until it changes again. */
+ int display_error_modiff;
/* The time at which we detected a failure to auto-save,
Or -1 if we didn't have a failure. */
int auto_save_failure_time;
displaying this buffer. */
unsigned prevent_redisplay_optimizations_p : 1;
- /* Changes in the buffer are recorded here for undo.
- t means don't record anything.
- This information belongs to the base buffer of an indirect buffer,
- But we can't store it in the struct buffer_text
- because local variables have to be right in the struct buffer.
- So we copy it around in set_buffer_internal.
- This comes before `name' because it is marked in a special way. */
- Lisp_Object undo_list;
-
- /* Everything from here down must be a Lisp_Object */
+ /* Everything from here down must be a Lisp_Object. */
/* The name of this buffer. */
Lisp_Object name;
Lisp_Object mode_name;
/* Mode line element that controls format of mode line. */
Lisp_Object mode_line_format;
+
+ /* Changes in the buffer are recorded here for undo.
+ t means don't record anything.
+ This information belongs to the base buffer of an indirect buffer,
+ But we can't store it in the struct buffer_text
+ because local variables have to be right in the struct buffer.
+ So we copy it around in set_buffer_internal.
+ This comes before `name' because it is marked in a special way. */
+ Lisp_Object undo_list;
/* Analogous to mode_line_format for the line displayed at the top
of windows. Nil means don't display that line. */
/* This buffer's category table. */
Lisp_Object category_table;
- /* Values of several buffer-local variables */
+ /* Values of several buffer-local variables. */
/* tab-width is buffer-local so that redisplay can find it
- in buffers that are not current */
+ in buffers that are not current. */
Lisp_Object case_fold_search;
Lisp_Object tab_width;
Lisp_Object fill_column;
saving. */
Lisp_Object buffer_file_coding_system;
- /* List of symbols naming the file format used for visited file. */
+ /* List of symbols naming the file format used for visited file. */
Lisp_Object file_format;
/* True if the newline position cache and width run cache are
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);
EXFUN (Fnext_overlay_change, 1);
EXFUN (Fdelete_overlay, 1);
+EXFUN (Fbuffer_local_value, 2);
/* Functions to call before and after each text change. */
extern Lisp_Object Vbefore_change_functions;
/* 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. */