*** empty log message ***
[bpt/emacs.git] / src / buffer.h
index 5c09f30..9dce1ae 100644 (file)
@@ -1,5 +1,5 @@
 /* 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.
 
@@ -53,6 +53,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 /* 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)
 
@@ -98,6 +101,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 /* 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)
 
@@ -363,7 +370,7 @@ extern Lisp_Object Vtransient_mark_mode;
    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)
@@ -379,7 +386,6 @@ extern Lisp_Object Vtransient_mark_mode;
  ((MARKERP ((P)) && XMARKER ((P))->buffer == current_buffer)   \
   ? marker_position ((P)) : 0)
 
-
 /* Allocation of buffer text.  */
 
 #ifdef REL_ALLOC