Mercurial > emacs
diff src/keyboard.c @ 108396:842d29bdc9a5
Merge from mainline.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Wed, 13 Jan 2010 14:05:08 +0000 |
parents | 1d1d5d9bd884 |
children | 14ff9accfbd3 1561cf68ce2a |
line wrap: on
line diff
--- a/src/keyboard.c Sun Jan 10 06:54:49 2010 +0000 +++ b/src/keyboard.c Wed Jan 13 14:05:08 2010 +0000 @@ -1,7 +1,7 @@ /* Keyboard and mouse input; editor command loop. Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. + 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -3155,6 +3155,7 @@ if (!NILP (tem)) { + struct buffer *prev_buffer = current_buffer; #if 0 /* This shouldn't be necessary anymore. --lorentey */ int was_locked = single_kboard; int count = SPECPDL_INDEX (); @@ -3178,7 +3179,16 @@ unbind_to (count, Qnil); #endif - goto retry; + if (current_buffer != prev_buffer) + { + /* The command may have changed the keymaps. Pretend there + is input in another keyboard and return. This will + recalculate keymaps. */ + c = make_number (-2); + goto exit; + } + else + goto retry; } /* Handle things that only apply to characters. */ @@ -7503,11 +7513,11 @@ signal (signo, input_available_signal); #endif /* USG */ + SIGNAL_THREAD_CHECK (signo); + #ifdef SYNC_INPUT interrupt_input_pending = 1; pending_signals = 1; -#else - SIGNAL_THREAD_CHECK (signo); #endif if (input_available_clear_time)