comparison 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
comparison
equal deleted inserted replaced
108395:e36c1160a378 108396:842d29bdc9a5
1 /* Keyboard and mouse input; editor command loop. 1 /* Keyboard and mouse input; editor command loop.
2 Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1994, 1995, 2 Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1994, 1995,
3 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 3 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004,
4 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 4 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
5 5
6 This file is part of GNU Emacs. 6 This file is part of GNU Emacs.
7 7
8 GNU Emacs is free software: you can redistribute it and/or modify 8 GNU Emacs is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
3153 tem = access_keymap (get_keymap (Vspecial_event_map, 0, 1), c, 0, 0, 1); 3153 tem = access_keymap (get_keymap (Vspecial_event_map, 0, 1), c, 0, 0, 1);
3154 Vquit_flag = save; 3154 Vquit_flag = save;
3155 3155
3156 if (!NILP (tem)) 3156 if (!NILP (tem))
3157 { 3157 {
3158 struct buffer *prev_buffer = current_buffer;
3158 #if 0 /* This shouldn't be necessary anymore. --lorentey */ 3159 #if 0 /* This shouldn't be necessary anymore. --lorentey */
3159 int was_locked = single_kboard; 3160 int was_locked = single_kboard;
3160 int count = SPECPDL_INDEX (); 3161 int count = SPECPDL_INDEX ();
3161 record_single_kboard_state (); 3162 record_single_kboard_state ();
3162 #endif 3163 #endif
3176 if (!was_locked) 3177 if (!was_locked)
3177 any_kboard_state (); 3178 any_kboard_state ();
3178 unbind_to (count, Qnil); 3179 unbind_to (count, Qnil);
3179 #endif 3180 #endif
3180 3181
3181 goto retry; 3182 if (current_buffer != prev_buffer)
3183 {
3184 /* The command may have changed the keymaps. Pretend there
3185 is input in another keyboard and return. This will
3186 recalculate keymaps. */
3187 c = make_number (-2);
3188 goto exit;
3189 }
3190 else
3191 goto retry;
3182 } 3192 }
3183 3193
3184 /* Handle things that only apply to characters. */ 3194 /* Handle things that only apply to characters. */
3185 if (INTEGERP (c)) 3195 if (INTEGERP (c))
3186 { 3196 {
7501 /* USG systems forget handlers when they are used; 7511 /* USG systems forget handlers when they are used;
7502 must reestablish each time */ 7512 must reestablish each time */
7503 signal (signo, input_available_signal); 7513 signal (signo, input_available_signal);
7504 #endif /* USG */ 7514 #endif /* USG */
7505 7515
7516 SIGNAL_THREAD_CHECK (signo);
7517
7506 #ifdef SYNC_INPUT 7518 #ifdef SYNC_INPUT
7507 interrupt_input_pending = 1; 7519 interrupt_input_pending = 1;
7508 pending_signals = 1; 7520 pending_signals = 1;
7509 #else
7510 SIGNAL_THREAD_CHECK (signo);
7511 #endif 7521 #endif
7512 7522
7513 if (input_available_clear_time) 7523 if (input_available_clear_time)
7514 EMACS_SET_SECS_USECS (*input_available_clear_time, 0, 0); 7524 EMACS_SET_SECS_USECS (*input_available_clear_time, 0, 0);
7515 7525