emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/src keyboard.c


From: Chong Yidong
Subject: [Emacs-diffs] emacs/src keyboard.c
Date: Sun, 30 Nov 2008 17:33:37 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      08/11/30 17:33:37

Modified files:
        src            : keyboard.c 

Log message:
        (timer_check): After a timer runs, ensure that the selected window's
        buffer is current.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/keyboard.c?cvsroot=emacs&r1=1.978&r2=1.979

Patches:
Index: keyboard.c
===================================================================
RCS file: /sources/emacs/emacs/src/keyboard.c,v
retrieving revision 1.978
retrieving revision 1.979
diff -u -b -r1.978 -r1.979
--- keyboard.c  2 Nov 2008 10:46:21 -0000       1.978
+++ keyboard.c  30 Nov 2008 17:33:36 -0000      1.979
@@ -4584,12 +4584,8 @@
            {
              int count = SPECPDL_INDEX ();
              Lisp_Object old_deactivate_mark = Vdeactivate_mark;
+             struct buffer *b;
 
-#if 0 /* This shouldn't be necessary anymore.  --lorentey  */
-             /* On unbind_to, resume allowing input from any kboard, if that
-                 was true before.  */
-              record_single_kboard_state ();
-#endif
              /* Mark the timer as triggered to prevent problems if the lisp
                 code fails to reschedule it right.  */
              vector[0] = Qt;
@@ -4601,6 +4597,13 @@
              timers_run++;
              unbind_to (count, Qnil);
 
+             /* We must ensure that the current buffer is the same as
+                the selected window's buffer, because the timers may
+                have made another buffer current (bug#1458).  */
+             b = XBUFFER (XWINDOW (selected_window)->buffer);
+             if (b != current_buffer)
+               set_buffer_internal (b);
+             
              /* Since we have handled the event,
                 we don't need to tell the caller to wake up and do it.  */
            }




reply via email to

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