aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2001-09-18 14:29:11 +0000
committerGerd Moellmann2001-09-18 14:29:11 +0000
commit9ce50b1eaf9ddabed6a1f10989f56c27e67b0f2a (patch)
treef5c9b2b40e7896aee9b1db519609fb69d9e59967 /src
parente58c389d2a6c0ea08a9395b55a0b89fda2ee5b7f (diff)
downloademacs-9ce50b1eaf9ddabed6a1f10989f56c27e67b0f2a.tar.gz
emacs-9ce50b1eaf9ddabed6a1f10989f56c27e67b0f2a.zip
(Frecursive_edit): Pass (BUFFER . SINGLE-KBOARD) to
recursive_edit_unwind. (recursive_edit_unwind): Set kboard state according to SINGLE-KBOARD.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c34
1 files changed, 25 insertions, 9 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index b15c213912c..f3d008e95dd 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -690,6 +690,7 @@ static void save_getcjmp ();
690static void restore_getcjmp P_ ((jmp_buf)); 690static void restore_getcjmp P_ ((jmp_buf));
691static Lisp_Object apply_modifiers P_ ((int, Lisp_Object)); 691static Lisp_Object apply_modifiers P_ ((int, Lisp_Object));
692static void clear_event P_ ((struct input_event *)); 692static void clear_event P_ ((struct input_event *));
693static void any_kboard_state P_ ((void));
693 694
694/* Nonzero means don't try to suspend even if the operating system seems 695/* Nonzero means don't try to suspend even if the operating system seems
695 to support it. */ 696 to support it. */
@@ -984,30 +985,45 @@ This function is called by the editor initialization to begin editing.")
984 () 985 ()
985{ 986{
986 int count = specpdl_ptr - specpdl; 987 int count = specpdl_ptr - specpdl;
988 Lisp_Object buffer;
987 989
988 command_loop_level++; 990 command_loop_level++;
989 update_mode_lines = 1; 991 update_mode_lines = 1;
990 992
993 if (command_loop_level
994 && current_buffer != XBUFFER (XWINDOW (selected_window)->buffer))
995 buffer = Fcurrent_buffer ();
996 else
997 buffer = Qnil;
998
999 /* If we leave recursive_edit_1 below with a `throw' for instance,
1000 like it is done in the splash screen display, we have to
1001 make sure that we restore single_kboard as command_loop_1
1002 would have done if it were left normally. */
991 record_unwind_protect (recursive_edit_unwind, 1003 record_unwind_protect (recursive_edit_unwind,
992 (command_loop_level 1004 Fcons (buffer, single_kboard ? Qt : Qnil));
993 && current_buffer != XBUFFER (XWINDOW (selected_window)->buffer)) 1005
994 ? Fcurrent_buffer ()
995 : Qnil);
996 recursive_edit_1 (); 1006 recursive_edit_1 ();
997 return unbind_to (count, Qnil); 1007 return unbind_to (count, Qnil);
998} 1008}
999 1009
1000Lisp_Object 1010Lisp_Object
1001recursive_edit_unwind (buffer) 1011recursive_edit_unwind (info)
1002 Lisp_Object buffer; 1012 Lisp_Object info;
1003{ 1013{
1004 if (!NILP (buffer)) 1014 if (BUFFERP (XCAR (info)))
1005 Fset_buffer (buffer); 1015 Fset_buffer (XCAR (info));
1006 1016
1017 if (NILP (XCDR (info)))
1018 any_kboard_state ();
1019 else
1020 single_kboard_state ();
1021
1007 command_loop_level--; 1022 command_loop_level--;
1008 update_mode_lines = 1; 1023 update_mode_lines = 1;
1009 return Qnil; 1024 return Qnil;
1010} 1025}
1026
1011 1027
1012static void 1028static void
1013any_kboard_state () 1029any_kboard_state ()