diff options
| author | Richard M. Stallman | 2002-07-07 10:17:26 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-07-07 10:17:26 +0000 |
| commit | f0bac7deee2f56ac02ff886dc5a1b7210e1fd089 (patch) | |
| tree | 06f43b7a2decbcd34de2c4b92215cc7d60564c8b | |
| parent | 0654d6e3fc28a7723fb4990bee8f9ad19cf0904b (diff) | |
| download | emacs-f0bac7deee2f56ac02ff886dc5a1b7210e1fd089.tar.gz emacs-f0bac7deee2f56ac02ff886dc5a1b7210e1fd089.zip | |
(Fbuffer_local_value): Store current value into its binding
so we get the up-to-date value for the binding that is loaded.
| -rw-r--r-- | src/buffer.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c index 65300cd9827..e371b3133ae 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -854,7 +854,26 @@ is the default binding of variable. */) | |||
| 854 | result = Fdefault_value (symbol); | 854 | result = Fdefault_value (symbol); |
| 855 | } | 855 | } |
| 856 | else | 856 | else |
| 857 | result = XCDR (result); | 857 | { |
| 858 | Lisp_Object valcontents; | ||
| 859 | Lisp_Object current_alist_element; | ||
| 860 | |||
| 861 | /* What binding is loaded right now? */ | ||
| 862 | valcontents = SYMBOL_VALUE (symbol); | ||
| 863 | current_alist_element | ||
| 864 | = XCAR (XBUFFER_LOCAL_VALUE (valcontents)->cdr); | ||
| 865 | |||
| 866 | /* The value of the currently loaded binding is not | ||
| 867 | stored in it, but rather in the realvalue slot. | ||
| 868 | Store that value into the binding it belongs to | ||
| 869 | in case that is the one we are about to use. */ | ||
| 870 | |||
| 871 | Fsetcdr (current_alist_element, | ||
| 872 | do_symval_forwarding (XBUFFER_LOCAL_VALUE (valcontents)->realvalue)); | ||
| 873 | |||
| 874 | /* Now get the (perhaps updated) value out of the binding. */ | ||
| 875 | result = XCDR (result); | ||
| 876 | } | ||
| 858 | 877 | ||
| 859 | if (EQ (result, Qunbound)) | 878 | if (EQ (result, Qunbound)) |
| 860 | return Fsignal (Qvoid_variable, Fcons (symbol, Qnil)); | 879 | return Fsignal (Qvoid_variable, Fcons (symbol, Qnil)); |