diff options
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/data.c b/src/data.c index 92a1062280e..65f2b0f2f1b 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -1958,6 +1958,16 @@ Instead, use `add-hook' and specify t for the LOCAL argument. */) | |||
| 1958 | (current_buffer, | 1958 | (current_buffer, |
| 1959 | Fcons (Fcons (variable, XCDR (blv->defcell)), | 1959 | Fcons (Fcons (variable, XCDR (blv->defcell)), |
| 1960 | BVAR (current_buffer, local_var_alist))); | 1960 | BVAR (current_buffer, local_var_alist))); |
| 1961 | |||
| 1962 | /* If the symbol forwards into a C variable, then load the binding | ||
| 1963 | for this buffer now, to preserve the invariant that forwarded | ||
| 1964 | variables must always hold the value corresponding to the | ||
| 1965 | current buffer (they are swapped eagerly). | ||
| 1966 | Otherwise, if C code modifies the variable before we load the | ||
| 1967 | binding in, then that new value would clobber the default binding | ||
| 1968 | the next time we unload it. See bug#34318. */ | ||
| 1969 | if (blv->fwd) | ||
| 1970 | swap_in_symval_forwarding (sym, blv); | ||
| 1961 | } | 1971 | } |
| 1962 | 1972 | ||
| 1963 | return variable; | 1973 | return variable; |