aboutsummaryrefslogtreecommitdiffstats
path: root/src/keyboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 382f99058d4..eb8c0c43fe6 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -802,6 +802,21 @@ echo_dash ()
802 == SCHARS (current_kboard->echo_string)) 802 == SCHARS (current_kboard->echo_string))
803 return; 803 return;
804 804
805 /* Do nothing if we have already put a dash at the end. */
806 if (SCHARS (current_kboard->echo_string) > 1)
807 {
808 Lisp_Object last_char, prev_char, idx;
809
810 idx = make_number (SCHARS (current_kboard->echo_string) - 2);
811 prev_char = Faref (current_kboard->echo_string, idx);
812
813 idx = make_number (SCHARS (current_kboard->echo_string) - 1);
814 last_char = Faref (current_kboard->echo_string, idx);
815
816 if (XINT (last_char) == '-' && XINT (prev_char) != ' ')
817 return;
818 }
819
805 /* Put a dash at the end of the buffer temporarily, 820 /* Put a dash at the end of the buffer temporarily,
806 but make it go away when the next character is added. */ 821 but make it go away when the next character is added. */
807 current_kboard->echo_string = concat2 (current_kboard->echo_string, 822 current_kboard->echo_string = concat2 (current_kboard->echo_string,