# HG changeset patch # User Karl Heuer # Date 888616588 0 # Node ID b52e351a40fae9c398f0599ef6d6dce1e561eef8 # Parent abc60038dd2b8d00cc5ed029ad9e288b8d718345 (store_symval_forwarding) : If buffer_local_types has -1, this variable is read-only. (Fset_default) : Unconditionally set the slot in buffer_defaults. diff -r abc60038dd2b -r b52e351a40fa src/data.c --- a/src/data.c Fri Feb 27 21:55:45 1998 +0000 +++ b/src/data.c Fri Feb 27 21:56:28 1998 +0000 @@ -784,6 +784,9 @@ Lisp_Object type; type = *(Lisp_Object *)(offset + (char *)&buffer_local_types); + if (XINT (type) == -1) + error ("Variable %s is read-only", XSYMBOL (symbol)->name->data); + if (! NILP (type) && ! NILP (newval) && XTYPE (newval) != XINT (type)) buffer_slot_type_mismatch (offset); @@ -1146,9 +1149,12 @@ register int mask = XINT (*((Lisp_Object *) (idx + (char *)&buffer_local_flags))); + *(Lisp_Object *)(idx + (char *) &buffer_defaults) = value; + + /* If this variable is not always local in all buffers, + set it in the buffers that don't nominally have a local value. */ if (mask > 0) { - *(Lisp_Object *)(idx + (char *) &buffer_defaults) = value; for (b = all_buffers; b; b = b->next) if (!(b->local_var_flags & mask)) *(Lisp_Object *)(idx + (char *) b) = value;