emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/src/data.c,v
Date: Thu, 22 Nov 2007 19:48:58 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        07/11/22 19:48:58

Index: data.c
===================================================================
RCS file: /sources/emacs/emacs/src/data.c,v
retrieving revision 1.285
retrieving revision 1.286
diff -u -b -r1.285 -r1.286
--- data.c      22 Nov 2007 16:15:24 -0000      1.285
+++ data.c      22 Nov 2007 19:48:57 -0000      1.286
@@ -1238,6 +1238,7 @@
          || buf != XBUFFER (XBUFFER_LOCAL_VALUE (valcontents)->buffer)
          || (XBUFFER_LOCAL_VALUE (valcontents)->check_frame
              && !EQ (selected_frame, XBUFFER_LOCAL_VALUE (valcontents)->frame))
+         /* Also unload a global binding (if the var is local_if_set). */
          || (EQ (XCAR (current_alist_element),
                  current_alist_element)))
        {
@@ -1257,7 +1258,7 @@
            {
              /* This buffer still sees the default value.  */
 
-             /* If the variable is a Lisp_Some_Buffer_Local_Value,
+             /* If the variable is not local_if_set,
                 or if this is `let' rather than `set',
                 make CURRENT-ALIST-ELEMENT point to itself,
                 indicating that we're seeing the default value.
@@ -1298,6 +1299,9 @@
          XBUFFER_LOCAL_VALUE (valcontents)->frame = selected_frame;
        }
       innercontents = XBUFFER_LOCAL_VALUE (valcontents)->realvalue;
+
+      /* Store the new value in the cons-cell.  */
+      XSETCDR (XCAR (XBUFFER_LOCAL_VALUE (valcontents)->cdr), newval);
     }
 
   /* If storing void (making the symbol void), forward only through
@@ -1307,24 +1311,6 @@
   else
     store_symval_forwarding (symbol, innercontents, newval, buf);
 
-  /* If we just set a variable whose current binding is frame-local,
-     store the new value in the frame parameter too.  */
-
-  if (BUFFER_LOCAL_VALUEP (valcontents))
-    {
-      /* What binding is loaded right now?  */
-      current_alist_element
-       = XCAR (XBUFFER_LOCAL_VALUE (valcontents)->cdr);
-
-      /* If the current buffer is not the buffer whose binding is
-        loaded, or if there may be frame-local bindings and the frame
-        isn't the right one, or if it's a Lisp_Buffer_Local_Value and
-        the default binding is loaded, the loaded binding may be the
-        wrong one.  */
-      if (XBUFFER_LOCAL_VALUE (valcontents)->found_for_frame)
-       XSETCDR (current_alist_element, newval);
-    }
-
   return newval;
 }
 




reply via email to

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