diff options
| author | Richard M. Stallman | 2003-04-30 12:08:07 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2003-04-30 12:08:07 +0000 |
| commit | 2ff4d3d9b8542bbc04b38f4bc577f9111919cb8b (patch) | |
| tree | eb43bae01ee81d6fee8657d817407f6df84b7f6d /src/keyboard.c | |
| parent | 9568459289e971e1e1a912a5f5cb4db181b41e0e (diff) | |
| download | emacs-2ff4d3d9b8542bbc04b38f4bc577f9111919cb8b.tar.gz emacs-2ff4d3d9b8542bbc04b38f4bc577f9111919cb8b.zip | |
(echo_char): Don't clear out a dash that follows a space.
Diffstat (limited to 'src/keyboard.c')
| -rw-r--r-- | src/keyboard.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 009184add07..e2e61d25798 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -785,14 +785,19 @@ echo_char (c) | |||
| 785 | /* Replace a dash from echo_dash with a space, otherwise | 785 | /* Replace a dash from echo_dash with a space, otherwise |
| 786 | add a space at the end as a separator between keys. */ | 786 | add a space at the end as a separator between keys. */ |
| 787 | if (STRINGP (echo_string) | 787 | if (STRINGP (echo_string) |
| 788 | && SCHARS (echo_string) > 0) | 788 | && SCHARS (echo_string) > 1) |
| 789 | { | 789 | { |
| 790 | Lisp_Object last_char, idx; | 790 | Lisp_Object last_char, prev_char, idx; |
| 791 | |||
| 792 | idx = make_number (SCHARS (echo_string) - 2); | ||
| 793 | prev_char = Faref (echo_string, idx); | ||
| 791 | 794 | ||
| 792 | idx = make_number (SCHARS (echo_string) - 1); | 795 | idx = make_number (SCHARS (echo_string) - 1); |
| 793 | last_char = Faref (echo_string, idx); | 796 | last_char = Faref (echo_string, idx); |
| 794 | 797 | ||
| 795 | if (XINT (last_char) == '-') | 798 | /* We test PREV_CHAR to make sure this isn't the echoing |
| 799 | of a minus-sign. */ | ||
| 800 | if (XINT (last_char) == '-' && XINT (prev_char) != ' ') | ||
| 796 | Faset (echo_string, idx, make_number (' ')); | 801 | Faset (echo_string, idx, make_number (' ')); |
| 797 | else | 802 | else |
| 798 | echo_string = concat2 (echo_string, build_string (" ")); | 803 | echo_string = concat2 (echo_string, build_string (" ")); |