aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1995-10-21 23:17:06 +0000
committerRichard M. Stallman1995-10-21 23:17:06 +0000
commit1fc93d49d9194d87a2288f9c398bad6cd1c84af7 (patch)
treef2423b00470e74a66edacb799fe438dbb37dd064 /src
parent67481ae554117a577d89f1a916e62927df18ac40 (diff)
downloademacs-1fc93d49d9194d87a2288f9c398bad6cd1c84af7.tar.gz
emacs-1fc93d49d9194d87a2288f9c398bad6cd1c84af7.zip
(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')
-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;
151/* True while displaying for echoing. Delays C-g throwing. */ 151/* True while displaying for echoing. Delays C-g throwing. */
152static int echoing; 152static int echoing;
153 153
154/* True means we can start echoing at the next input pause
155 even though there is something in the echo area. */
156static int ok_to_echo_at_next_pause;
157
154/* Nonzero means disregard local maps for the menu bar. */ 158/* Nonzero means disregard local maps for the menu bar. */
155static int inhibit_local_menu_bar_menus; 159static int inhibit_local_menu_bar_menus;
156 160
@@ -655,6 +659,7 @@ cancel_echoing ()
655 current_kboard->immediate_echo = 0; 659 current_kboard->immediate_echo = 0;
656 current_kboard->echoptr = current_kboard->echobuf; 660 current_kboard->echoptr = current_kboard->echobuf;
657 current_kboard->echo_after_prompt = -1; 661 current_kboard->echo_after_prompt = -1;
662 ok_to_echo_at_next_pause = 0;
658} 663}
659 664
660/* Return the length of the current echo string. */ 665/* Return the length of the current echo string. */
@@ -1758,7 +1763,8 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
1758 1763
1759 /* Message turns off echoing unless more keystrokes turn it on again. */ 1764 /* Message turns off echoing unless more keystrokes turn it on again. */
1760 if (echo_area_glyphs && *echo_area_glyphs 1765 if (echo_area_glyphs && *echo_area_glyphs
1761 && echo_area_glyphs != current_kboard->echobuf) 1766 && echo_area_glyphs != current_kboard->echobuf
1767 && ! ok_to_echo_at_next_pause)
1762 cancel_echoing (); 1768 cancel_echoing ();
1763 else 1769 else
1764 /* If already echoing, continue. */ 1770 /* If already echoing, continue. */
@@ -1833,7 +1839,8 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
1833 && this_command_key_count > 0 1839 && this_command_key_count > 0
1834 && ! noninteractive 1840 && ! noninteractive
1835 && echo_keystrokes > 0 1841 && echo_keystrokes > 0
1836 && (echo_area_glyphs == 0 || *echo_area_glyphs == 0)) 1842 && (echo_area_glyphs == 0 || *echo_area_glyphs == 0
1843 || ok_to_echo_at_next_pause))
1837 { 1844 {
1838 Lisp_Object tem0; 1845 Lisp_Object tem0;
1839 1846
@@ -2130,6 +2137,9 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
2130 echo_char (c); 2137 echo_char (c);
2131 if (! NILP (also_record)) 2138 if (! NILP (also_record))
2132 echo_char (also_record); 2139 echo_char (also_record);
2140 /* Once we reread a character, echoing can happen
2141 the next time we pause to read a new one. */
2142 ok_to_echo_at_next_pause = 1;
2133 } 2143 }
2134 2144
2135 /* Record this character as part of the current key. */ 2145 /* Record this character as part of the current key. */