diff options
author | Karl Heuer <kwzh@gnu.org> | 1998-02-27 21:56:28 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1998-02-27 21:56:28 +0000 |
commit | b9f579b5aa5bb333d0d529bd9ee7ffee5f228b07 (patch) | |
tree | 00794ced86a7d4d7b6caf293b2697a72c3659dea /src/data.c | |
parent | 71ed89d6a74c54c8fd400c626a8729248028dee0 (diff) | |
download | emacs-b9f579b5aa5bb333d0d529bd9ee7ffee5f228b07.tar.gz |
(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.
Diffstat (limited to 'src/data.c')
-rw-r--r-- | src/data.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/data.c b/src/data.c index ba7ed98b527..492b87e30b7 100644 --- a/src/data.c +++ b/src/data.c @@ -784,6 +784,9 @@ store_symval_forwarding (symbol, valcontents, newval) 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 @@ for this variable.") 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; |