diff options
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) | |||
| 784 | Lisp_Object type; | 784 | Lisp_Object type; |
| 785 | 785 | ||
| 786 | type = *(Lisp_Object *)(offset + (char *)&buffer_local_types); | 786 | type = *(Lisp_Object *)(offset + (char *)&buffer_local_types); |
| 787 | if (XINT (type) == -1) | ||
| 788 | error ("Variable %s is read-only", XSYMBOL (symbol)->name->data); | ||
| 789 | |||
| 787 | if (! NILP (type) && ! NILP (newval) | 790 | if (! NILP (type) && ! NILP (newval) |
| 788 | && XTYPE (newval) != XINT (type)) | 791 | && XTYPE (newval) != XINT (type)) |
| 789 | buffer_slot_type_mismatch (offset); | 792 | buffer_slot_type_mismatch (offset); |
| @@ -1146,9 +1149,12 @@ for this variable.") | |||
| 1146 | register int mask = XINT (*((Lisp_Object *) | 1149 | register int mask = XINT (*((Lisp_Object *) |
| 1147 | (idx + (char *)&buffer_local_flags))); | 1150 | (idx + (char *)&buffer_local_flags))); |
| 1148 | 1151 | ||
| 1152 | *(Lisp_Object *)(idx + (char *) &buffer_defaults) = value; | ||
| 1153 | |||
| 1154 | /* If this variable is not always local in all buffers, | ||
| 1155 | set it in the buffers that don't nominally have a local value. */ | ||
| 1149 | if (mask > 0) | 1156 | if (mask > 0) |
| 1150 | { | 1157 | { |
| 1151 | *(Lisp_Object *)(idx + (char *) &buffer_defaults) = value; | ||
| 1152 | for (b = all_buffers; b; b = b->next) | 1158 | for (b = all_buffers; b; b = b->next) |
| 1153 | if (!(b->local_var_flags & mask)) | 1159 | if (!(b->local_var_flags & mask)) |
| 1154 | *(Lisp_Object *)(idx + (char *) b) = value; | 1160 | *(Lisp_Object *)(idx + (char *) b) = value; |