JimB's changes since January 18th
[bpt/emacs.git] / src / buffer.h
index a75d81b..77784d2 100644 (file)
@@ -1,11 +1,11 @@
 /* Header file for the buffer manipulation primitives.
-   Copyright (C) 1985, 1986, 1990 Free Software Foundation, Inc.
+   Copyright (C) 1985, 1986, 1990, 1992 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
 GNU Emacs is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
+the Free Software Foundation; either version 2, or (at your option)
 any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
@@ -23,7 +23,21 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #endif /* lint */
 
 
+#ifdef USE_TEXT_PROPERTIES
+#define SET_PT(position) (set_point ((position), current_buffer))
+#define TEMP_SET_PT(position) (temp_set_point ((position), current_buffer))
+
+#define BUF_SET_PT(buffer, position) (set_point ((position), (buffer)))
+#define BUF_TEMP_SET_PT(buffer, position) (temp_set_point ((position), (buffer)))
+
+#else  /* don't support text properties */
+
 #define SET_PT(position) (current_buffer->text.pt = (position))
+#define TEMP_SET_PT(position) (current_buffer->text.pt = (position))
+
+#define BUF_SET_PT(buffer, position) (buffer->text.pt = (position))
+#define BUF_TEMP_SET_PT(buffer, position) (buffer->text.pt = (position))
+#endif /* don't support text properties */
 
 /* Character position of beginning of buffer.  */ 
 #define BEG (1)
@@ -71,8 +85,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 /* Now similar macros for a specified buffer.
    Note that many of these evaluate the buffer argument more than once.  */
 
-#define BUF_SET_PT(buffer, position) (buffer->text.pt = (position))
-
 /* Character position of beginning of buffer.  */ 
 #define BUF_BEG(buf) (1)
 
@@ -162,6 +174,9 @@ struct buffer
        the last time this buffer was displayed */
     int last_window_start;
 
+    /* Properties of this buffer's text -- conditionally compiled. */
+    DECLARE_INTERVALS
+
     /* This is a special exception -- as this slot should not be
        marked by gc_sweep, and as it is not lisp-accessible as
        a local variable -- so we regard it as not really being of type
@@ -296,6 +311,15 @@ extern struct buffer buffer_local_flags;
 
 extern struct buffer buffer_local_symbols;
 
+/* This structure holds the required types for the values in the
+   buffer-local slots.  If a slot contains Qnil, then the
+   corresponding buffer slot may contain a value of any type.  If a
+   slot contains an integer, then prospective values' tags must be
+   equal to that integer.  When a tag does not match, the function
+   buffer_slot_type_mismatch will signal an error.  The value Qnil may
+   always be safely stored in any slot.  */
+extern struct buffer buffer_local_types;
+
 /* Point in the current buffer. */
 
 #define point (current_buffer->text.pt + 0)
@@ -316,7 +340,8 @@ extern void reset_buffer ();
 /* Functions to call before and after each text change. */
 extern Lisp_Object Vbefore_change_function;
 extern Lisp_Object Vafter_change_function;
-extern Lisp_Object Vfirst_change_function;
+extern Lisp_Object Vfirst_change_hook;
+extern Lisp_Object Qfirst_change_hook;
 
 /* Fields.
 
@@ -354,5 +379,14 @@ whatever you like.  */
 #define R_ALLOC_DECLARE(var,data)
 #endif
 
+/* VAX C is non-ANSI wrt extern declarations and requires the struct
+   re_pattern_buffer to completely defined for searchbuf's declaration.  */
+#ifdef VMS
+#include "regex.h"
+#endif /* VMS */
+
 /* A search buffer, with a fastmap allocated and ready to go.  */
 extern struct re_pattern_buffer searchbuf;
+
+extern Lisp_Object Fbuffer_name ();
+extern Lisp_Object Fget_file_buffer ();