aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1995-02-25 07:13:09 +0000
committerKarl Heuer1995-02-25 07:13:09 +0000
commit604ccd1d31a056d5c6f33bf846377a14567bf367 (patch)
treeadfee47cead552cd157efb853fee3544d5439274
parentdb2474b88d0e98d1236dbf873b6b38ffea7865fb (diff)
downloademacs-604ccd1d31a056d5c6f33bf846377a14567bf367.tar.gz
emacs-604ccd1d31a056d5c6f33bf846377a14567bf367.zip
(unlock_display): New function.
(cmd_error, command_loop_1): Call it when appropriate. (read_char): If no current display, don't try to echo.
-rw-r--r--src/keyboard.c43
1 files changed, 30 insertions, 13 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 56800409d6b..c2f8d88553b 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -733,6 +733,19 @@ recursive_edit_unwind (buffer)
733 return Qnil; 733 return Qnil;
734} 734}
735 735
736#ifdef MULTI_PERDISPLAY
737static void
738unlock_display ()
739{
740 if (CONSP (Vunread_command_events))
741 current_perdisplay->kbd_queue
742 = nconc2 (Vunread_command_events, current_perdisplay->kbd_queue);
743 Vunread_command_events = Qnil;
744 current_perdisplay = 0;
745 display_locked = 0;
746}
747#endif
748
736Lisp_Object 749Lisp_Object
737cmd_error (data) 750cmd_error (data)
738 Lisp_Object data; 751 Lisp_Object data;
@@ -750,8 +763,7 @@ cmd_error (data)
750 763
751 Vinhibit_quit = Qnil; 764 Vinhibit_quit = Qnil;
752#ifdef MULTI_PERDISPLAY 765#ifdef MULTI_PERDISPLAY
753 current_perdisplay = 0; 766 unlock_display ();
754 display_locked = 0;
755#endif 767#endif
756 768
757 return make_number (0); 769 return make_number (0);
@@ -951,7 +963,7 @@ command_loop_1 ()
951 int prev_modiff; 963 int prev_modiff;
952 struct buffer *prev_buffer; 964 struct buffer *prev_buffer;
953#ifdef MULTI_PERDISPLAY 965#ifdef MULTI_PERDISPLAY
954 PERDISPLAY *outer_perdisplay = current_perdisplay; 966 int was_locked = display_locked;
955#endif 967#endif
956 968
957 Vdeactivate_mark = Qnil; 969 Vdeactivate_mark = Qnil;
@@ -1275,8 +1287,8 @@ command_loop_1 ()
1275 finalize_kbd_macro_chars (); 1287 finalize_kbd_macro_chars ();
1276 1288
1277#ifdef MULTI_PERDISPLAY 1289#ifdef MULTI_PERDISPLAY
1278 current_perdisplay = outer_perdisplay; 1290 if (!was_locked)
1279 display_locked = (current_perdisplay != 0); 1291 unlock_display ();
1280#endif 1292#endif
1281 } 1293 }
1282} 1294}
@@ -1600,13 +1612,16 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
1600 goto non_reread; 1612 goto non_reread;
1601 } 1613 }
1602 1614
1603 /* Message turns off echoing unless more keystrokes turn it on again. */ 1615 if (current_perdisplay)
1604 if (echo_area_glyphs && *echo_area_glyphs 1616 {
1605 && echo_area_glyphs != current_perdisplay->echobuf) 1617 /* Message turns off echoing unless more keystrokes turn it on again. */
1606 cancel_echoing (); 1618 if (echo_area_glyphs && *echo_area_glyphs
1607 else 1619 && echo_area_glyphs != current_perdisplay->echobuf)
1608 /* If already echoing, continue. */ 1620 cancel_echoing ();
1609 echo_dash (); 1621 else
1622 /* If already echoing, continue. */
1623 echo_dash ();
1624 }
1610 1625
1611 /* Try reading a character via menu prompting in the minibuf. 1626 /* Try reading a character via menu prompting in the minibuf.
1612 Try this before the sit-for, because the sit-for 1627 Try this before the sit-for, because the sit-for
@@ -1631,7 +1646,9 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
1631 1646
1632 /* If in middle of key sequence and minibuffer not active, 1647 /* If in middle of key sequence and minibuffer not active,
1633 start echoing if enough time elapses. */ 1648 start echoing if enough time elapses. */
1634 if (minibuf_level == 0 && !current_perdisplay->immediate_echo 1649 if (current_perdisplay
1650 && minibuf_level == 0
1651 && !current_perdisplay->immediate_echo
1635 && this_command_key_count > 0 1652 && this_command_key_count > 0
1636 && ! noninteractive 1653 && ! noninteractive
1637 && echo_keystrokes > 0 1654 && echo_keystrokes > 0