diff options
| author | Stefan Monnier | 2007-11-15 06:00:07 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-11-15 06:00:07 +0000 |
| commit | 262fcd41bc9928861c75e09e3a9c37b50565faa2 (patch) | |
| tree | 5bdcadc08a0df8eda5265eed5d9a904f0c1eed03 /src | |
| parent | a81f03138a6dbb3b0b45ca85a828ab6409d1c2f4 (diff) | |
| download | emacs-262fcd41bc9928861c75e09e3a9c37b50565faa2.tar.gz emacs-262fcd41bc9928861c75e09e3a9c37b50565faa2.zip | |
(swap_in_global_binding): Fix longstanding bug where
store_symval_forwarding was not called with the right second argument,
thus causing objfwd-ing from being dropped.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/data.c | 21 |
2 files changed, 15 insertions, 12 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index fe0aa6c8f55..f4f63e3c4d9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2007-11-15 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * data.c (swap_in_global_binding): Fix longstanding bug where | ||
| 4 | store_symval_forwarding was not called with the right second argument, | ||
| 5 | thus causing objfwd-ing from being dropped. | ||
| 6 | |||
| 1 | 2007-11-14 Juanma Barranquero <lekktu@gmail.com> | 7 | 2007-11-14 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 8 | ||
| 3 | * macfns.c (Fx_create_frame, Fx_display_pixel_width) | 9 | * macfns.c (Fx_create_frame, Fx_display_pixel_width) |
diff --git a/src/data.c b/src/data.c index 9796b649f72..070d5a0c7ce 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -1011,26 +1011,23 @@ void | |||
| 1011 | swap_in_global_binding (symbol) | 1011 | swap_in_global_binding (symbol) |
| 1012 | Lisp_Object symbol; | 1012 | Lisp_Object symbol; |
| 1013 | { | 1013 | { |
| 1014 | Lisp_Object valcontents, cdr; | 1014 | Lisp_Object valcontents = SYMBOL_VALUE (symbol); |
| 1015 | 1015 | struct Lisp_Buffer_Local_Value *blv = XBUFFER_LOCAL_VALUE (valcontents); | |
| 1016 | valcontents = SYMBOL_VALUE (symbol); | 1016 | Lisp_Object cdr = blv->cdr; |
| 1017 | if (!BUFFER_LOCAL_VALUEP (valcontents)) | ||
| 1018 | abort (); | ||
| 1019 | cdr = XBUFFER_LOCAL_VALUE (valcontents)->cdr; | ||
| 1020 | 1017 | ||
| 1021 | /* Unload the previously loaded binding. */ | 1018 | /* Unload the previously loaded binding. */ |
| 1022 | Fsetcdr (XCAR (cdr), | 1019 | Fsetcdr (XCAR (cdr), |
| 1023 | do_symval_forwarding (XBUFFER_LOCAL_VALUE (valcontents)->realvalue)); | 1020 | do_symval_forwarding (blv->realvalue)); |
| 1024 | 1021 | ||
| 1025 | /* Select the global binding in the symbol. */ | 1022 | /* Select the global binding in the symbol. */ |
| 1026 | XSETCAR (cdr, cdr); | 1023 | XSETCAR (cdr, cdr); |
| 1027 | store_symval_forwarding (symbol, valcontents, XCDR (cdr), NULL); | 1024 | store_symval_forwarding (symbol, blv->realvalue, XCDR (cdr), NULL); |
| 1028 | 1025 | ||
| 1029 | /* Indicate that the global binding is set up now. */ | 1026 | /* Indicate that the global binding is set up now. */ |
| 1030 | XBUFFER_LOCAL_VALUE (valcontents)->frame = Qnil; | 1027 | blv->frame = Qnil; |
| 1031 | XBUFFER_LOCAL_VALUE (valcontents)->buffer = Qnil; | 1028 | blv->buffer = Qnil; |
| 1032 | XBUFFER_LOCAL_VALUE (valcontents)->found_for_frame = 0; | 1029 | blv->found_for_frame = 0; |
| 1033 | XBUFFER_LOCAL_VALUE (valcontents)->found_for_buffer = 0; | 1030 | blv->found_for_buffer = 0; |
| 1034 | } | 1031 | } |
| 1035 | 1032 | ||
| 1036 | /* Set up the buffer-local symbol SYMBOL for validity in the current buffer. | 1033 | /* Set up the buffer-local symbol SYMBOL for validity in the current buffer. |