changeset 20996:b52e351a40fa

(store_symval_forwarding) <Lisp_Misc_Buffer_Objfwd>: If buffer_local_types has -1, this variable is read-only. (Fset_default) <BUFFER_OBJFWDP>: Unconditionally set the slot in buffer_defaults.
author Karl Heuer <kwzh@gnu.org>
date Fri, 27 Feb 1998 21:56:28 +0000
parents abc60038dd2b
children 115d8c173aaf
files src/data.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;