emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/buffer.c,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/src/buffer.c,v
Date: Mon, 19 Nov 2007 07:44:31 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        07/11/19 07:44:31

Index: buffer.c
===================================================================
RCS file: /sources/emacs/emacs/src/buffer.c,v
retrieving revision 1.538
retrieving revision 1.539
diff -u -b -r1.538 -r1.539
--- buffer.c    16 Oct 2007 15:42:58 -0000      1.538
+++ buffer.c    19 Nov 2007 07:44:30 -0000      1.539
@@ -895,7 +895,6 @@
   CHECK_BUFFER (buffer);
   buf = XBUFFER (buffer);
 
-  if (SYMBOLP (variable))
     variable = indirect_variable (variable);
 
   /* Look in local_var_list */
@@ -2518,26 +2517,11 @@
 
       /* Need not do anything if some other buffer's binding is now encached.  
*/
       tem = XBUFFER_LOCAL_VALUE (SYMBOL_VALUE (sym))->buffer;
-      if (BUFFERP (tem) && XBUFFER (tem) == current_buffer)
+      if (EQ (tem, buffer))
        {
-         /* Symbol is set up for this buffer's old local value.
-            Set it up for the current buffer with the default value.  */
-
-         tem = XBUFFER_LOCAL_VALUE (SYMBOL_VALUE (sym))->cdr;
-         /* Store the symbol's current value into the alist entry
-            it is currently set up for.  This is so that, if the
-            local is marked permanent, and we make it local again
-            later in Fkill_all_local_variables, we don't lose the value.  */
-         XSETCDR (XCAR (tem),
-                  do_symval_forwarding (XBUFFER_LOCAL_VALUE (SYMBOL_VALUE 
(sym))->realvalue));
-         /* Switch to the symbol's default-value alist entry.  */
-         XSETCAR (tem, tem);
-         /* Mark it as current for buffer B.  */
-         XBUFFER_LOCAL_VALUE (SYMBOL_VALUE (sym))->buffer = buffer;
-         /* Store the current value into any forwarding in the symbol.  */
-         store_symval_forwarding (sym,
-                                  XBUFFER_LOCAL_VALUE (SYMBOL_VALUE 
(sym))->realvalue,
-                                  XCDR (tem), NULL);
+         /* Symbol is set up for this buffer's old local value:
+            swap it out!  */
+         swap_in_global_binding (sym);
        }
     }
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]