/* Header file for the buffer manipulation primitives.
- Copyright (C) 1985, 1986, 1990, 1993 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1986, 1993 Free Software Foundation, Inc.
This file is part of GNU Emacs.
/* Character position of end of buffer. */
#define Z (current_buffer->text.z)
+/* Is the current buffer narrowed? */
+#define NARROWED ((BEGV != BEG) || (ZV != Z))
+
/* Modification count. */
#define MODIFF (current_buffer->text.modiff)
/* Character position of end of buffer. */
#define BUF_Z(buf) ((buf)->text.z)
+/* Is this buffer narrowed? */
+#define BUF_NARROWED(buf) ((BUF_BEGV(buf) != BUF_BEG(buf)) \
+ || (BUF_ZV(buf) != BUF_Z(buf)))
+
/* Modification count. */
#define BUF_MODIFF(buf) ((buf)->text.modiff)
Therefore, we cannot assume that they remain valid--we must check. */
/* 1 if the OV is a cons cell whose car is a cons cell. */
-#define OVERLAY_VALID(OV) (CONSP ((OV)) && CONSP (XCONS ((OV))->car))
+#define OVERLAY_VALID(OV) (OVERLAYP (OV))
/* Return the marker that stands for where OV starts in the buffer. */
#define OVERLAY_START(OV) (XCONS (XCONS ((OV))->car)->car)
((MARKERP ((P)) && XMARKER ((P))->buffer == current_buffer) \
? marker_position ((P)) : 0)
-
/* Allocation of buffer text. */
#ifdef REL_ALLOC