emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r112250: * src/window.c (select_windo


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r112250: * src/window.c (select_window): Don't record_buffer while the invariant is
Date: Mon, 08 Apr 2013 14:04:58 -0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 112250
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14161
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2013-04-08 14:04:58 -0400
message:
  * src/window.c (select_window): Don't record_buffer while the invariant is
  temporarily broken.
  * src/fns.c (Fdelq): Don't assume !NILP => CONSP.
modified:
  src/ChangeLog
  src/fns.c
  src/keyboard.c
  src/window.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-04-07 16:18:41 +0000
+++ b/src/ChangeLog     2013-04-08 18:04:58 +0000
@@ -1,3 +1,10 @@
+2013-04-08  Stefan Monnier  <address@hidden>
+
+       * window.c (select_window): Don't record_buffer while the invariant is
+       temporarily broken (bug#14161).
+
+       * fns.c (Fdelq): Don't assume !NILP => CONSP.
+
 2013-04-07  Eli Zaretskii  <address@hidden>
 
        * fileio.c (ACL_NOT_WELL_SUPPORTED): Define macro for WINDOWSNT.

=== modified file 'src/fns.c'
--- a/src/fns.c 2013-04-07 04:41:19 +0000
+++ b/src/fns.c 2013-04-08 18:04:58 +0000
@@ -1551,7 +1551,7 @@
 
   tail = list;
   prev = Qnil;
-  while (!NILP (tail))
+  while (CONSP (tail))
     {
       CHECK_LIST_CONS (tail, list);
       tem = XCAR (tail);

=== modified file 'src/keyboard.c'
--- a/src/keyboard.c    2013-03-29 15:50:21 +0000
+++ b/src/keyboard.c    2013-04-08 18:04:58 +0000
@@ -72,7 +72,7 @@
 #include TERM_HEADER
 #endif /* HAVE_WINDOW_SYSTEM */
 
-/* Variables for blockinput.h: */
+/* Variables for blockinput.h:  */
 
 /* Positive if interrupt input is blocked right now.  */
 volatile int interrupt_input_blocked;
@@ -4337,10 +4337,10 @@
            }
 
          idle_timer_ripe = EMACS_TIME_LE (idle_timer_time, idleness_now);
-         idle_timer_difference =
-           (idle_timer_ripe
-            ? sub_emacs_time (idleness_now, idle_timer_time)
-            : sub_emacs_time (idle_timer_time, idleness_now));
+         idle_timer_difference
+           = (idle_timer_ripe
+              ? sub_emacs_time (idleness_now, idle_timer_time)
+              : sub_emacs_time (idle_timer_time, idleness_now));
        }
 
       /* Decide which timer is the next timer,

=== modified file 'src/window.c'
--- a/src/window.c      2013-04-02 01:54:56 +0000
+++ b/src/window.c      2013-04-08 18:04:58 +0000
@@ -485,12 +485,6 @@
   w = XWINDOW (window);
   w->frozen_window_start_p = 0;
 
-  if (NILP (norecord))
-    {
-      w->use_time = ++window_select_count;
-      record_buffer (w->contents);
-    }
-
   /* Make the selected window's buffer current.  */
   Fset_buffer (w->contents);
 
@@ -515,6 +509,15 @@
 
   select_window_1 (window, inhibit_point_swap);
 
+  /* record_buffer can run QUIT, so make sure it is run only after we have
+     re-established the invariant between selected_window and selected_frame,
+     otherwise the temporary broken invariant might "escape" (bug#14161).  */
+  if (NILP (norecord))
+    {
+      w->use_time = ++window_select_count;
+      record_buffer (w->contents);
+    }
+
   bset_last_selected_window (XBUFFER (w->contents), window);
   windows_or_buffers_changed++;
   return window;
@@ -2929,7 +2932,7 @@
 
   replace_window (root, window, 1);
 
-  /* This must become SWINDOW anyway ....... */
+  /* This must become SWINDOW anyway .......  */
   if (BUFFERP (w->contents) && !resize_failed)
     {
       /* Try to minimize scrolling, by setting the window start to the


reply via email to

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