]> git.eshelyaron.com Git - emacs.git/commitdiff
Cleanup
authorGiuseppe Scrivano <gscrivano@gnu.org>
Tue, 12 Jan 2010 12:23:27 +0000 (13:23 +0100)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Tue, 12 Jan 2010 12:23:27 +0000 (13:23 +0100)
src/data.c

index 62ab506c5e4a99c410a536a3eeafd0bd0dff29dc..a347b87bfe527c58d75199797a539f52ae5b807b 100644 (file)
@@ -823,19 +823,19 @@ blocal_get_thread_data (struct Lisp_Buffer_Local_Value *l)
 
       for (it = l->thread_data; !NILP (it); it = XCDR (it))
         {
-          Lisp_Object head = XCDR (XCAR (it));
-          if ((EQ (Fcurrent_buffer (), BLOCAL_BUFFER_VEC (head)))
+          Lisp_Object thread_data = XCDR (XCAR (it));
+          if ((EQ (Fcurrent_buffer (), BLOCAL_BUFFER_VEC (thread_data)))
               && (! l->check_frame
-                  || EQ (selected_frame, BLOCAL_FRAME_VEC (head))))
+                  || EQ (selected_frame, BLOCAL_FRAME_VEC (thread_data))))
             {
-              Lisp_Object v = BLOCAL_CDR_VEC (head);
-              parent = head;
-
-              if (EQ (v, XCAR (v)))
+              Lisp_Object cdr = BLOCAL_CDR_VEC (thread_data);
+              parent = thread_data;
+              VECTORP (thread_data) || (abort (), 1);
+              if (EQ (XCAR (cdr), XCAR (XCAR (cdr))))
                 val = XCDR (assq_no_quit (XCAR (XCAR (it)),
                                    XTHREADLOCAL (l->realvalue)->thread_alist));
               else
-                val = XCDR (BLOCAL_CDR_VEC (head));
+                val = XCDR (BLOCAL_CDR_VEC (thread_data));
 
               break;
             }
@@ -1185,33 +1185,33 @@ store_symval_forwarding (symbol, valcontents, newval, buf)
       valcontents = SYMBOL_VALUE (symbol);
       if (BUFFER_LOCAL_VALUEP (valcontents))
         {
-          Lisp_Object v = BLOCAL_CDR (XBUFFER_LOCAL_VALUE (valcontents));
-            if (EQ (v, XCAR (v)))
-              {
-                Lisp_Object it;
-                for (it = XBUFFER_LOCAL_VALUE (valcontents)->thread_data;
-                     !NILP (it); it = XCDR (it))
-                  {
-                    Lisp_Object head = XCDR (XCAR (it));
-                    if (1 || EQ (BLOCAL_BUFFER (XBUFFER_LOCAL_VALUE (valcontents)),
-                            BLOCAL_BUFFER_VEC (head))
-                        && (! XBUFFER_LOCAL_VALUE (valcontents)->check_frame
-                            || EQ (selected_frame, BLOCAL_FRAME_VEC (head))))
-                      {
-                        Lisp_Object rv
-                          = XBUFFER_LOCAL_VALUE (valcontents)->realvalue;
-
-                        if (EQ (BLOCAL_CDR_VEC (head),
-                                XCAR (BLOCAL_CDR_VEC (head))))
-                          Fsetcdr (assq_no_quit (XCAR (XCAR (it)),
-                                                 XTHREADLOCAL (rv)->thread_alist),
-                                   newval);
-
-                        XSETCDR (XCAR (BLOCAL_CDR_VEC (head)), newval);
-                      }
-                  }
-              }
-            BLOCAL_REALVALUE (XBUFFER_LOCAL_VALUE (valcontents)) = newval;
+          Lisp_Object cdr = BLOCAL_CDR (XBUFFER_LOCAL_VALUE (valcontents));
+          if (EQ (XCAR (cdr), XCAR (XCAR (cdr))))
+            {
+              Lisp_Object it;
+              for (it = XBUFFER_LOCAL_VALUE (valcontents)->thread_data;
+                   !NILP (it); it = XCDR (it))
+                {
+                  Lisp_Object head = XCDR (XCAR (it));
+                  if (EQ (BLOCAL_BUFFER (XBUFFER_LOCAL_VALUE (valcontents)),
+                          BLOCAL_BUFFER_VEC (head))
+                      && (! XBUFFER_LOCAL_VALUE (valcontents)->check_frame
+                          || EQ (selected_frame, BLOCAL_FRAME_VEC (head))))
+                    {
+                      Lisp_Object rv
+                        = XBUFFER_LOCAL_VALUE (valcontents)->realvalue;
+
+                      if (EQ (XCAR (BLOCAL_CDR_VEC (head)),
+                              XCAR (XCAR (BLOCAL_CDR_VEC (head)))))
+                        Fsetcdr (assq_no_quit (XCAR (XCAR (it)),
+                                               XTHREADLOCAL (rv)->thread_alist),
+                                 newval);
+
+                      XSETCDR (XCAR (BLOCAL_CDR_VEC (head)), newval);
+                    }
+                }
+            }
+          BLOCAL_REALVALUE (XBUFFER_LOCAL_VALUE (valcontents)) = newval;
         }
       else if (THREADLOCALP (valcontents))
         {