summaryrefslogtreecommitdiff
path: root/src/keyboard.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-10-21 23:17:06 +0000
committerRichard M. Stallman <rms@gnu.org>1995-10-21 23:17:06 +0000
commitd862694f957d1451900fa2932ff1ae1882d33157 (patch)
tree6827f7fd04982e5e8ac5f2e5f0822cb01c831d09 /src/keyboard.c
parent713feab84e259fb21ab0bff1197308d4e800461d (diff)
downloademacs-d862694f957d1451900fa2932ff1ae1882d33157.tar.gz
(read_char): If we reread a char, the next pause
can start echoing despite a remaining echo area message. (ok_to_echo_at_next_pause): New variable. (cancel_echoing): Clear ok_to_echo_at_next_pause.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index cce87895707..2263e699f47 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -151,6 +151,10 @@ int waiting_for_input;
/* True while displaying for echoing. Delays C-g throwing. */
static int echoing;
+/* True means we can start echoing at the next input pause
+ even though there is something in the echo area. */
+static int ok_to_echo_at_next_pause;
+
/* Nonzero means disregard local maps for the menu bar. */
static int inhibit_local_menu_bar_menus;
@@ -655,6 +659,7 @@ cancel_echoing ()
current_kboard->immediate_echo = 0;
current_kboard->echoptr = current_kboard->echobuf;
current_kboard->echo_after_prompt = -1;
+ ok_to_echo_at_next_pause = 0;
}
/* Return the length of the current echo string. */
@@ -1758,7 +1763,8 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
/* Message turns off echoing unless more keystrokes turn it on again. */
if (echo_area_glyphs && *echo_area_glyphs
- && echo_area_glyphs != current_kboard->echobuf)
+ && echo_area_glyphs != current_kboard->echobuf
+ && ! ok_to_echo_at_next_pause)
cancel_echoing ();
else
/* If already echoing, continue. */
@@ -1833,7 +1839,8 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
&& this_command_key_count > 0
&& ! noninteractive
&& echo_keystrokes > 0
- && (echo_area_glyphs == 0 || *echo_area_glyphs == 0))
+ && (echo_area_glyphs == 0 || *echo_area_glyphs == 0
+ || ok_to_echo_at_next_pause))
{
Lisp_Object tem0;
@@ -2130,6 +2137,9 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
echo_char (c);
if (! NILP (also_record))
echo_char (also_record);
+ /* Once we reread a character, echoing can happen
+ the next time we pause to read a new one. */
+ ok_to_echo_at_next_pause = 1;
}
/* Record this character as part of the current key. */