+2010-10-04 Chong Yidong <cyd@stupidchicken.com>
+
+ * keyboard.c (echo_prompt): Function moved into read_key_sequence.
+ (read_key_sequence): Inline echo_prompt.
+ (echo_dash): Add a dash only if key is continued (Bug#7137).
+
2010-10-04 Dan Nicolaescu <dann@ics.uci.edu>
Remove O_RDONLY, O_WRONLY definitions, not needed.
static int cannot_suspend;
\f
-/* Install the string STR as the beginning of the string of echoing,
- so that it serves as a prompt for the next character.
- Also start echoing. */
-
-void
-echo_prompt (Lisp_Object str)
-{
- current_kboard->echo_string = str;
- current_kboard->echo_after_prompt = SCHARS (str);
- echo_now ();
-}
-
/* Add C to the echo string, if echoing is going on.
C can be a character, which is printed prettily ("M-C-x" and all that
jazz), or a symbol, whose name is printed. */
if (NILP (current_kboard->echo_string))
return;
+ if (this_command_key_count == 0)
+ return;
+
if (!current_kboard->immediate_echo
&& SCHARS (current_kboard->echo_string) == 0)
return;
if (INTERACTIVE)
{
if (!NILP (prompt))
- echo_prompt (prompt);
+ {
+ /* Install the string STR as the beginning of the string of
+ echoing, so that it serves as a prompt for the next
+ character. */
+ current_kboard->echo_string = prompt;
+ current_kboard->echo_after_prompt = SCHARS (prompt);
+ echo_now ();
+ }
else if (cursor_in_echo_area
&& (FLOATP (Vecho_keystrokes) || INTEGERP (Vecho_keystrokes))
&& NILP (Fzerop (Vecho_keystrokes)))