diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/keyboard.c | 15 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b3a9386da86..e40abdc3daa 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2004-07-14 K,Ba(Broly L,Bu(Brentey <lorentey@elte.hu> | ||
| 2 | |||
| 3 | * keyboard.c (echo_dash): Do nothing if there already is a dash | ||
| 4 | at the end of the echo string. | ||
| 5 | |||
| 1 | 2004-07-12 Kim F. Storm <storm@cua.dk> | 6 | 2004-07-12 Kim F. Storm <storm@cua.dk> |
| 2 | 7 | ||
| 3 | * alloc.c (mark_object): Only look at Lisp_Misc_Save_Value | 8 | * alloc.c (mark_object): Only look at Lisp_Misc_Save_Value |
diff --git a/src/keyboard.c b/src/keyboard.c index f016a1283e4..89706dc3dce 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, |