changeset 28351:e3d57f7fba49

Use new macro names for handling per-buffer variables.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 27 Mar 2000 12:50:13 +0000
parents 51fbfd80a45f
children 1555145f8c35
files src/category.c src/data.c src/print.c src/syntax.c
diffstat 4 files changed, 25 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/src/category.c	Mon Mar 27 12:49:02 2000 +0000
+++ b/src/category.c	Mon Mar 27 12:50:13 2000 +0000
@@ -276,8 +276,8 @@
   table = check_category_table (table);
   current_buffer->category_table = table;
   /* Indicate that this buffer now has a specified category table.  */
-  idx = BUFFER_LOCAL_VAR_IDX (category_table);
-  SET_BUFFER_HAS_LOCAL_VALUE_P (current_buffer, idx, 1);
+  idx = PER_BUFFER_VAR_IDX (category_table);
+  SET_PER_BUFFER_VALUE_P (current_buffer, idx, 1);
   return table;
 }
 
--- a/src/data.c	Mon Mar 27 12:49:02 2000 +0000
+++ b/src/data.c	Mon Mar 27 12:50:13 2000 +0000
@@ -738,7 +738,7 @@
 
       case Lisp_Misc_Buffer_Objfwd:
 	offset = XBUFFER_OBJFWD (valcontents)->offset;
-	return BUFFER_LOCAL_VALUE (current_buffer, offset);
+	return PER_BUFFER_VALUE (current_buffer, offset);
 
       case Lisp_Misc_Kboard_Objfwd:
 	offset = XKBOARD_OBJFWD (valcontents)->offset;
@@ -783,7 +783,7 @@
 	    int offset = XBUFFER_OBJFWD (valcontents)->offset;
 	    Lisp_Object type;
 
-	    type = BUFFER_LOCAL_TYPE (offset);
+	    type = PER_BUFFER_TYPE (offset);
 	    if (XINT (type) == -1)
 	      error ("Variable %s is read-only", XSYMBOL (symbol)->name->data);
 
@@ -791,7 +791,7 @@
 		&& XTYPE (newval) != XINT (type))
 	      buffer_slot_type_mismatch (offset);
 
-	    BUFFER_LOCAL_VALUE (current_buffer, offset) = newval;
+	    PER_BUFFER_VALUE (current_buffer, offset) = newval;
 	  }
 	  break;
 
@@ -902,7 +902,7 @@
 	  return *XOBJFWD (valcontents)->objvar;
 
 	case Lisp_Misc_Buffer_Objfwd:
-	  return BUFFER_LOCAL_VALUE (current_buffer,
+	  return PER_BUFFER_VALUE (current_buffer,
 				     XBUFFER_OBJFWD (valcontents)->offset);
 
 	case Lisp_Misc_Kboard_Objfwd:
@@ -991,11 +991,11 @@
   if (BUFFER_OBJFWDP (valcontents))
     {
       int offset = XBUFFER_OBJFWD (valcontents)->offset;
-      int idx = BUFFER_LOCAL_IDX (offset);
+      int idx = PER_BUFFER_IDX (offset);
       if (idx > 0
 	  && !bindflag
 	  && !let_shadows_buffer_binding_p (symbol))
-	SET_BUFFER_HAS_LOCAL_VALUE_P (buf, idx, 1);
+	SET_PER_BUFFER_VALUE_P (buf, idx, 1);
     }
 
   else if (BUFFER_LOCAL_VALUEP (valcontents)
@@ -1108,8 +1108,8 @@
   if (BUFFER_OBJFWDP (valcontents))
     {
       int offset = XBUFFER_OBJFWD (valcontents)->offset;
-      if (BUFFER_LOCAL_IDX (offset) != 0)
-	return BUFFER_LOCAL_DEFAULT_VALUE (offset);
+      if (PER_BUFFER_IDX (offset) != 0)
+	return PER_BUFFER_DEFAULT (offset);
     }
 
   /* Handle user-created local variables.  */
@@ -1180,9 +1180,9 @@
   if (BUFFER_OBJFWDP (valcontents))
     {
       int offset = XBUFFER_OBJFWD (valcontents)->offset;
-      int idx = BUFFER_LOCAL_IDX (offset);
-
-      BUFFER_LOCAL_DEFAULT_VALUE (offset) = value;
+      int idx = PER_BUFFER_IDX (offset);
+
+      PER_BUFFER_DEFAULT (offset) = value;
 
       /* If this variable is not always local in all buffers,
 	 set it in the buffers that don't nominally have a local value.  */
@@ -1191,8 +1191,8 @@
 	  struct buffer *b;
 	  
 	  for (b = all_buffers; b; b = b->next)
-	    if (!BUFFER_HAS_LOCAL_VALUE_P (b, idx))
-	      BUFFER_LOCAL_VALUE (b, offset) = value;
+	    if (!PER_BUFFER_VALUE_P (b, idx))
+	      PER_BUFFER_VALUE (b, offset) = value;
 	}
       return value;
     }
@@ -1410,13 +1410,13 @@
   if (BUFFER_OBJFWDP (valcontents))
     {
       int offset = XBUFFER_OBJFWD (valcontents)->offset;
-      int idx = BUFFER_LOCAL_IDX (offset);
+      int idx = PER_BUFFER_IDX (offset);
 
       if (idx > 0)
 	{
-	  SET_BUFFER_HAS_LOCAL_VALUE_P (current_buffer, idx, 0);
-	  BUFFER_LOCAL_VALUE (current_buffer, offset)
-	    = BUFFER_LOCAL_DEFAULT_VALUE (offset);
+	  SET_PER_BUFFER_VALUE_P (current_buffer, idx, 0);
+	  PER_BUFFER_VALUE (current_buffer, offset)
+	    = PER_BUFFER_DEFAULT (offset);
 	}
       return variable;
     }
@@ -1532,8 +1532,8 @@
   if (BUFFER_OBJFWDP (valcontents))
     {
       int offset = XBUFFER_OBJFWD (valcontents)->offset;
-      int idx = BUFFER_LOCAL_IDX (offset);
-      if (idx == -1 || BUFFER_HAS_LOCAL_VALUE_P (buf, idx))
+      int idx = PER_BUFFER_IDX (offset);
+      if (idx == -1 || PER_BUFFER_VALUE_P (buf, idx))
 	return Qt;
     }
   return Qnil;
--- a/src/print.c	Mon Mar 27 12:49:02 2000 +0000
+++ b/src/print.c	Mon Mar 27 12:50:13 2000 +0000
@@ -1772,8 +1772,8 @@
 
 	case Lisp_Misc_Buffer_Objfwd:
 	  strout ("#<buffer_objfwd to ", -1, -1, printcharfun, 0);
-	  print_object (BUFFER_LOCAL_VALUE (current_buffer,
-					    XBUFFER_OBJFWD (obj)->offset),
+	  print_object (PER_BUFFER_VALUE (current_buffer,
+					  XBUFFER_OBJFWD (obj)->offset),
 			printcharfun, escapeflag);
 	  PRINTCHAR ('>');
 	  break;
--- a/src/syntax.c	Mon Mar 27 12:49:02 2000 +0000
+++ b/src/syntax.c	Mon Mar 27 12:50:13 2000 +0000
@@ -725,8 +725,8 @@
   check_syntax_table (table);
   current_buffer->syntax_table = table;
   /* Indicate that this buffer now has a specified syntax table.  */
-  idx = BUFFER_LOCAL_VAR_IDX (syntax_table);
-  SET_BUFFER_HAS_LOCAL_VALUE_P (current_buffer, idx, 1);
+  idx = PER_BUFFER_VAR_IDX (syntax_table);
+  SET_PER_BUFFER_VALUE_P (current_buffer, idx, 1);
   return table;
 }