]> git.eshelyaron.com Git - emacs.git/commitdiff
(swap_in_global_binding): Fix longstanding bug where
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 15 Nov 2007 06:00:07 +0000 (06:00 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 15 Nov 2007 06:00:07 +0000 (06:00 +0000)
store_symval_forwarding was not called with the right second argument,
thus causing objfwd-ing from being dropped.

src/ChangeLog
src/data.c

index fe0aa6c8f555bd28a99ad07d9dda7b44ae6b8b3f..f4f63e3c4d9627b2d5d693469d601c1ca861d6d4 100644 (file)
@@ -1,3 +1,9 @@
+2007-11-15  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * data.c (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.
+
 2007-11-14  Juanma Barranquero  <lekktu@gmail.com>
 
        * macfns.c (Fx_create_frame, Fx_display_pixel_width)
index 9796b649f72666030f4d1c4418c9b79f06a35ec0..070d5a0c7cedf52a0fc9fc809d296dc1b70b952b 100644 (file)
@@ -1011,26 +1011,23 @@ void
 swap_in_global_binding (symbol)
      Lisp_Object symbol;
 {
-  Lisp_Object valcontents, cdr;
-
-  valcontents = SYMBOL_VALUE (symbol);
-  if (!BUFFER_LOCAL_VALUEP (valcontents))
-    abort ();
-  cdr = XBUFFER_LOCAL_VALUE (valcontents)->cdr;
+  Lisp_Object valcontents = SYMBOL_VALUE (symbol);
+  struct Lisp_Buffer_Local_Value *blv = XBUFFER_LOCAL_VALUE (valcontents);
+  Lisp_Object cdr = blv->cdr;
 
   /* Unload the previously loaded binding.  */
   Fsetcdr (XCAR (cdr),
-          do_symval_forwarding (XBUFFER_LOCAL_VALUE (valcontents)->realvalue));
+          do_symval_forwarding (blv->realvalue));
 
   /* Select the global binding in the symbol.  */
   XSETCAR (cdr, cdr);
-  store_symval_forwarding (symbol, valcontents, XCDR (cdr), NULL);
+  store_symval_forwarding (symbol, blv->realvalue, XCDR (cdr), NULL);
 
   /* Indicate that the global binding is set up now.  */
-  XBUFFER_LOCAL_VALUE (valcontents)->frame = Qnil;
-  XBUFFER_LOCAL_VALUE (valcontents)->buffer = Qnil;
-  XBUFFER_LOCAL_VALUE (valcontents)->found_for_frame = 0;
-  XBUFFER_LOCAL_VALUE (valcontents)->found_for_buffer = 0;
+  blv->frame = Qnil;
+  blv->buffer = Qnil;
+  blv->found_for_frame = 0;
+  blv->found_for_buffer = 0;
 }
 
 /* Set up the buffer-local symbol SYMBOL for validity in the current buffer.