diff options
| author | Karoly Lorentey | 2006-01-28 22:46:08 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2006-01-28 22:46:08 +0000 |
| commit | 67ddbec3529fd15915d09a196321f7d081dfc610 (patch) | |
| tree | 1742ff258ace2e0db89b083f2900f20fba3d4053 /src | |
| parent | ae4a0f10ecbecae8ba6a2a9cebb984eaab96dbb6 (diff) | |
| download | emacs-67ddbec3529fd15915d09a196321f7d081dfc610.tar.gz emacs-67ddbec3529fd15915d09a196321f7d081dfc610.zip | |
Fix some bugs related to wrong_kboard_jmpbuf.
* src/keyboard.c (read_char): Declare. Update call to
`read_char_minibuf_menu_prompt'. Set wrong_kboard_jmpbuf correctly in
recursive calls.
(read_char_minibuf_menu_prompt): Add wrong_kboard_jmpbuf
parameter. Use it in call to `read_char'.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-499
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 6c94ef30efa..142a0f3c26c 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -651,7 +651,8 @@ static Lisp_Object read_char_x_menu_prompt P_ ((int, Lisp_Object *, | |||
| 651 | Lisp_Object, int *)); | 651 | Lisp_Object, int *)); |
| 652 | static Lisp_Object read_char_x_menu_prompt (); | 652 | static Lisp_Object read_char_x_menu_prompt (); |
| 653 | static Lisp_Object read_char_minibuf_menu_prompt P_ ((int, int, | 653 | static Lisp_Object read_char_minibuf_menu_prompt P_ ((int, int, |
| 654 | Lisp_Object *)); | 654 | Lisp_Object *, |
| 655 | jmp_buf *)); | ||
| 655 | static Lisp_Object make_lispy_event P_ ((struct input_event *)); | 656 | static Lisp_Object make_lispy_event P_ ((struct input_event *)); |
| 656 | #ifdef HAVE_MOUSE | 657 | #ifdef HAVE_MOUSE |
| 657 | static Lisp_Object make_lispy_movement P_ ((struct frame *, Lisp_Object, | 658 | static Lisp_Object make_lispy_movement P_ ((struct frame *, Lisp_Object, |
| @@ -677,6 +678,8 @@ static void timer_start_idle P_ ((void)); | |||
| 677 | static void timer_stop_idle P_ ((void)); | 678 | static void timer_stop_idle P_ ((void)); |
| 678 | static void timer_resume_idle P_ ((void)); | 679 | static void timer_resume_idle P_ ((void)); |
| 679 | 680 | ||
| 681 | Lisp_Object read_char P_ ((int, int, Lisp_Object *, Lisp_Object, int *, jmp_buf *)); | ||
| 682 | |||
| 680 | /* Nonzero means don't try to suspend even if the operating system seems | 683 | /* Nonzero means don't try to suspend even if the operating system seems |
| 681 | to support it. */ | 684 | to support it. */ |
| 682 | static int cannot_suspend; | 685 | static int cannot_suspend; |
| @@ -2685,7 +2688,8 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, wrong_kboard_j | |||
| 2685 | && unread_command_char < 0 | 2688 | && unread_command_char < 0 |
| 2686 | && !detect_input_pending_run_timers (0)) | 2689 | && !detect_input_pending_run_timers (0)) |
| 2687 | { | 2690 | { |
| 2688 | c = read_char_minibuf_menu_prompt (commandflag, nmaps, maps); | 2691 | c = read_char_minibuf_menu_prompt (commandflag, nmaps, maps, |
| 2692 | wrong_kboard_jmpbuf); | ||
| 2689 | if (! NILP (c)) | 2693 | if (! NILP (c)) |
| 2690 | { | 2694 | { |
| 2691 | key_already_recorded = 1; | 2695 | key_already_recorded = 1; |
| @@ -2874,13 +2878,13 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, wrong_kboard_j | |||
| 2874 | } | 2878 | } |
| 2875 | } | 2879 | } |
| 2876 | 2880 | ||
| 2877 | /* Notify the caller if a timer or sentinel or filter in the sit_for | 2881 | /* Notify the caller if an autosave hook, or a timer, sentinel or |
| 2878 | calls above have changed the current kboard. This could happen | 2882 | filter in the sit_for calls above have changed the current |
| 2879 | if they use the minibuffer or start a recursive edit, like the | 2883 | kboard. This could happen if they use the minibuffer or start a |
| 2880 | fancy splash screen in server.el's filter. If this longjmp | 2884 | recursive edit, like the fancy splash screen in server.el's |
| 2881 | wasn't here, read_key_sequence would interpret the next key | 2885 | filter. If this longjmp wasn't here, read_key_sequence would |
| 2882 | sequence using the wrong translation tables and function | 2886 | interpret the next key sequence using the wrong translation |
| 2883 | keymaps. */ | 2887 | tables and function keymaps. */ |
| 2884 | if (NILP (c) && current_kboard != orig_kboard) | 2888 | if (NILP (c) && current_kboard != orig_kboard) |
| 2885 | { | 2889 | { |
| 2886 | UNGCPRO; | 2890 | UNGCPRO; |
| @@ -3306,7 +3310,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, wrong_kboard_j | |||
| 3306 | 3310 | ||
| 3307 | cancel_echoing (); | 3311 | cancel_echoing (); |
| 3308 | do | 3312 | do |
| 3309 | c = read_char (0, 0, 0, Qnil, 0, &wrong_kboard_jmpbuf); | 3313 | c = read_char (0, 0, 0, Qnil, 0, wrong_kboard_jmpbuf); |
| 3310 | while (BUFFERP (c)); | 3314 | while (BUFFERP (c)); |
| 3311 | /* Remove the help from the frame */ | 3315 | /* Remove the help from the frame */ |
| 3312 | unbind_to (count, Qnil); | 3316 | unbind_to (count, Qnil); |
| @@ -3316,7 +3320,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, wrong_kboard_j | |||
| 3316 | { | 3320 | { |
| 3317 | cancel_echoing (); | 3321 | cancel_echoing (); |
| 3318 | do | 3322 | do |
| 3319 | c = read_char (0, 0, 0, Qnil, 0, &wrong_kboard_jmpbuf); | 3323 | c = read_char (0, 0, 0, Qnil, 0, wrong_kboard_jmpbuf); |
| 3320 | while (BUFFERP (c)); | 3324 | while (BUFFERP (c)); |
| 3321 | } | 3325 | } |
| 3322 | } | 3326 | } |
| @@ -8237,10 +8241,11 @@ static char *read_char_minibuf_menu_text; | |||
| 8237 | static int read_char_minibuf_menu_width; | 8241 | static int read_char_minibuf_menu_width; |
| 8238 | 8242 | ||
| 8239 | static Lisp_Object | 8243 | static Lisp_Object |
| 8240 | read_char_minibuf_menu_prompt (commandflag, nmaps, maps) | 8244 | read_char_minibuf_menu_prompt (commandflag, nmaps, maps, wrong_kboard_jmpbuf) |
| 8241 | int commandflag ; | 8245 | int commandflag ; |
| 8242 | int nmaps; | 8246 | int nmaps; |
| 8243 | Lisp_Object *maps; | 8247 | Lisp_Object *maps; |
| 8248 | jmp_buf *wrong_kboard_jmpbuf; | ||
| 8244 | { | 8249 | { |
| 8245 | int mapno; | 8250 | int mapno; |
| 8246 | register Lisp_Object name; | 8251 | register Lisp_Object name; |
| @@ -8463,7 +8468,7 @@ read_char_minibuf_menu_prompt (commandflag, nmaps, maps) | |||
| 8463 | orig_defn_macro = current_kboard->defining_kbd_macro; | 8468 | orig_defn_macro = current_kboard->defining_kbd_macro; |
| 8464 | current_kboard->defining_kbd_macro = Qnil; | 8469 | current_kboard->defining_kbd_macro = Qnil; |
| 8465 | do | 8470 | do |
| 8466 | obj = read_char (commandflag, 0, 0, Qt, 0); | 8471 | obj = read_char (commandflag, 0, 0, Qt, 0, wrong_kboard_jmpbuf); |
| 8467 | while (BUFFERP (obj)); | 8472 | while (BUFFERP (obj)); |
| 8468 | current_kboard->defining_kbd_macro = orig_defn_macro; | 8473 | current_kboard->defining_kbd_macro = orig_defn_macro; |
| 8469 | 8474 | ||