comparison src/keyboard.c @ 109390:f1045a53471c

Merge from mainline.
author Katsumi Yamaoka <katsumi@flagship2>
date Wed, 14 Jul 2010 13:03:03 +0000
parents 4e99d7aa7526
children 68ca98ae70fb
comparison
equal deleted inserted replaced
109358:a9586dc942d5 109390:f1045a53471c
3591 } 3591 }
3592 3592
3593 /* Return the number of slots occupied in kbd_buffer. */ 3593 /* Return the number of slots occupied in kbd_buffer. */
3594 3594
3595 static int 3595 static int
3596 kbd_buffer_nr_stored () 3596 kbd_buffer_nr_stored (void)
3597 { 3597 {
3598 return kbd_fetch_ptr == kbd_store_ptr 3598 return kbd_fetch_ptr == kbd_store_ptr
3599 ? 0 3599 ? 0
3600 : (kbd_fetch_ptr < kbd_store_ptr 3600 : (kbd_fetch_ptr < kbd_store_ptr
3601 ? kbd_store_ptr - kbd_fetch_ptr 3601 ? kbd_store_ptr - kbd_fetch_ptr
6899 6899
6900 event.kind = BUFFER_SWITCH_EVENT; 6900 event.kind = BUFFER_SWITCH_EVENT;
6901 event.frame_or_window = Qnil; 6901 event.frame_or_window = Qnil;
6902 event.arg = Qnil; 6902 event.arg = Qnil;
6903 6903
6904 #ifdef subprocesses
6905 /* We don't need a buffer-switch event unless Emacs is waiting for input. 6904 /* We don't need a buffer-switch event unless Emacs is waiting for input.
6906 The purpose of the event is to make read_key_sequence look up the 6905 The purpose of the event is to make read_key_sequence look up the
6907 keymaps again. If we aren't in read_key_sequence, we don't need one, 6906 keymaps again. If we aren't in read_key_sequence, we don't need one,
6908 and the event could cause trouble by messing up (input-pending-p). */ 6907 and the event could cause trouble by messing up (input-pending-p).
6908 Note: Fwaiting_for_user_input_p always returns nil when async
6909 subprocesses aren't supported. */
6909 tem = Fwaiting_for_user_input_p (); 6910 tem = Fwaiting_for_user_input_p ();
6910 if (NILP (tem)) 6911 if (NILP (tem))
6911 return; 6912 return;
6912 #else
6913 /* We never need these events if we have no asynchronous subprocesses. */
6914 return;
6915 #endif
6916 6913
6917 /* Make sure no interrupt happens while storing the event. */ 6914 /* Make sure no interrupt happens while storing the event. */
6918 #ifdef SIGIO 6915 #ifdef SIGIO
6919 if (interrupt_input) 6916 if (interrupt_input)
6920 { 6917 {
11534 Lisp_Object *var; 11531 Lisp_Object *var;
11535 char *name; 11532 char *name;
11536 Lisp_Object *kind; 11533 Lisp_Object *kind;
11537 }; 11534 };
11538 11535
11539 struct event_head head_table[] = { 11536 static const struct event_head head_table[] = {
11540 {&Qmouse_movement, "mouse-movement", &Qmouse_movement}, 11537 {&Qmouse_movement, "mouse-movement", &Qmouse_movement},
11541 {&Qscroll_bar_movement, "scroll-bar-movement", &Qmouse_movement}, 11538 {&Qscroll_bar_movement, "scroll-bar-movement", &Qmouse_movement},
11542 {&Qswitch_frame, "switch-frame", &Qswitch_frame}, 11539 {&Qswitch_frame, "switch-frame", &Qswitch_frame},
11543 {&Qdelete_frame, "delete-frame", &Qdelete_frame}, 11540 {&Qdelete_frame, "delete-frame", &Qdelete_frame},
11544 {&Qiconify_frame, "iconify-frame", &Qiconify_frame}, 11541 {&Qiconify_frame, "iconify-frame", &Qiconify_frame},
11719 11716
11720 last_point_position_buffer = Qnil; 11717 last_point_position_buffer = Qnil;
11721 last_point_position_window = Qnil; 11718 last_point_position_window = Qnil;
11722 11719
11723 { 11720 {
11724 struct event_head *p; 11721 const struct event_head *p;
11725 11722
11726 for (p = head_table; 11723 for (p = head_table;
11727 p < head_table + (sizeof (head_table) / sizeof (head_table[0])); 11724 p < head_table + (sizeof (head_table) / sizeof (head_table[0]));
11728 p++) 11725 p++)
11729 { 11726 {