]> git.eshelyaron.com Git - emacs.git/commitdiff
Define and use SET_PER_BUFFER_VALUE_RAW
authorTom Tromey <tromey@redhat.com>
Sun, 15 Nov 2009 04:44:54 +0000 (05:44 +0100)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Sun, 15 Nov 2009 04:44:54 +0000 (05:44 +0100)
src/buffer.c
src/buffer.h
src/data.c

index 648ae1d004f5c7f834b5b2869184435f31cb4308..0b899f250d4cb8e65e1b9812a2ab096805291eee 100644 (file)
@@ -517,7 +517,7 @@ clone_per_buffer_values (from, to)
          set_marker_both (obj, to_buffer, m->charpos, m->bytepos);
        }
 
-      PER_BUFFER_VALUE (to, offset) = obj;
+      SET_PER_BUFFER_VALUE_RAW (to, offset, obj);
     }
 
   bcopy (from->local_flags, to->local_flags, sizeof to->local_flags);
@@ -826,7 +826,7 @@ reset_buffer_local_variables (b, permanent_too)
               || buffer_permanent_local_flags[idx] == 0))
          /* Is -2 used anywhere?  */
          || idx == -2)
-       PER_BUFFER_VALUE (b, offset) = PER_BUFFER_DEFAULT (offset);
+       SET_PER_BUFFER_VALUE_RAW (b, offset, PER_BUFFER_DEFAULT (offset));
     }
 }
 
index 28e344a407128b3531f2078a77fa9e5025284c99..a61a349a05547a830ee55cbeab787d573d1935c4 100644 (file)
@@ -1066,7 +1066,10 @@ extern int last_per_buffer_idx;
    OFFSET in the buffer structure.  */
 
 #define PER_BUFFER_VALUE(BUFFER, OFFSET) \
-      (*(Lisp_Object *)((OFFSET) + (char *) (BUFFER)))
+      (*find_variable_location ((Lisp_Object *)((OFFSET) + (char *) (BUFFER))))
+
+#define SET_PER_BUFFER_VALUE_RAW(BUFFER, OFFSET, VALUE) \
+      ((*((Lisp_Object *)((OFFSET) + (char *) (BUFFER)))) = (VALUE))
 
 /* Return the symbol of the per-buffer variable at offset OFFSET in
    the buffer structure.  */
index 9eabf68ca6b0b91bf3380e891475bc3c139ec032..da74750952a8823958669ee38fa2d8fc70552fe8 100644 (file)
@@ -1033,7 +1033,7 @@ store_symval_forwarding (symbol, valcontents, newval, buf)
                  b = XBUFFER (buf);
 
                  if (! PER_BUFFER_VALUE_P (b, idx))
-                   PER_BUFFER_VALUE (b, offset) = newval;
+                   SET_PER_BUFFER_VALUE_RAW (b, offset, newval);
                }
            }
          break;