diff options
Diffstat (limited to 'src')
| -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 571114802a1..ed6dedbe243 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -1954,6 +1954,16 @@ Instead, use `add-hook' and specify t for the LOCAL argument. */) | |||
| 1954 | (current_buffer, | 1954 | (current_buffer, |
| 1955 | Fcons (Fcons (variable, XCDR (blv->defcell)), | 1955 | Fcons (Fcons (variable, XCDR (blv->defcell)), |
| 1956 | BVAR (current_buffer, local_var_alist))); | 1956 | BVAR (current_buffer, local_var_alist))); |
| 1957 | |||
| 1958 | /* If the symbol forwards into a C variable, then load the binding | ||
| 1959 | for this buffer now, to preserve the invariant that forwarded | ||
| 1960 | variables must always hold the value corresponding to the | ||
| 1961 | current buffer (they are swapped eagerly). | ||
| 1962 | Otherwise, if C code modifies the variable before we load the | ||
| 1963 | binding in, then that new value would clobber the default binding | ||
| 1964 | the next time we unload it. See bug#34318. */ | ||
| 1965 | if (blv->fwd) | ||
| 1966 | swap_in_symval_forwarding (sym, blv); | ||
| 1957 | } | 1967 | } |
| 1958 | 1968 | ||
| 1959 | return variable; | 1969 | return variable; |