diff options
| author | Karoly Lorentey | 2004-07-18 21:49:24 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-07-18 21:49:24 +0000 |
| commit | 31d7e9bc5a474c2da8c40f4812ea3e09cd5fb82c (patch) | |
| tree | 729a3c238e43ed5625290e994d9ef0d09c18241a /src/keyboard.c | |
| parent | 4cb2afc64f004ba91ff0bd37cf8ca6669b228988 (diff) | |
| parent | cdfa3eccb179fe579a5e38949d0a2ad3d2757524 (diff) | |
| download | emacs-31d7e9bc5a474c2da8c40f4812ea3e09cd5fb82c.tar.gz emacs-31d7e9bc5a474c2da8c40f4812ea3e09cd5fb82c.zip | |
Merged in changes from CVS trunk.
Patches applied:
* lorentey@elte.hu--2004/emacs--hacks--0--patch-2
Prevent special events from appending dashes to the echo string.
* lorentey@elte.hu--2004/emacs--hacks--0--patch-4
Added ChangeLog entry.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-454
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-455
Bash the dashes
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-456
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-457
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-458
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-459
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-460
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-219
Diffstat (limited to 'src/keyboard.c')
| -rw-r--r-- | src/keyboard.c | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 3fc685d58c7..40a545180fe 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -791,6 +791,21 @@ echo_dash () | |||
| 791 | == SCHARS (current_kboard->echo_string)) | 791 | == SCHARS (current_kboard->echo_string)) |
| 792 | return; | 792 | return; |
| 793 | 793 | ||
| 794 | /* Do nothing if we have already put a dash at the end. */ | ||
| 795 | if (SCHARS (current_kboard->echo_string) > 1) | ||
| 796 | { | ||
| 797 | Lisp_Object last_char, prev_char, idx; | ||
| 798 | |||
| 799 | idx = make_number (SCHARS (current_kboard->echo_string) - 2); | ||
| 800 | prev_char = Faref (current_kboard->echo_string, idx); | ||
| 801 | |||
| 802 | idx = make_number (SCHARS (current_kboard->echo_string) - 1); | ||
| 803 | last_char = Faref (current_kboard->echo_string, idx); | ||
| 804 | |||
| 805 | if (XINT (last_char) == '-' && XINT (prev_char) != ' ') | ||
| 806 | return; | ||
| 807 | } | ||
| 808 | |||
| 794 | /* Put a dash at the end of the buffer temporarily, | 809 | /* Put a dash at the end of the buffer temporarily, |
| 795 | but make it go away when the next character is added. */ | 810 | but make it go away when the next character is added. */ |
| 796 | current_kboard->echo_string = concat2 (current_kboard->echo_string, | 811 | current_kboard->echo_string = concat2 (current_kboard->echo_string, |
| @@ -1063,6 +1078,19 @@ single_kboard_state () | |||
| 1063 | #endif | 1078 | #endif |
| 1064 | } | 1079 | } |
| 1065 | 1080 | ||
| 1081 | /* If we're in single_kboard state for kboard KBOARD, | ||
| 1082 | get out of it. */ | ||
| 1083 | |||
| 1084 | void | ||
| 1085 | not_single_kboard_state (kboard) | ||
| 1086 | KBOARD *kboard; | ||
| 1087 | { | ||
| 1088 | #ifdef MULTI_KBOARD | ||
| 1089 | if (kboard == current_kboard) | ||
| 1090 | single_kboard = 0; | ||
| 1091 | #endif | ||
| 1092 | } | ||
| 1093 | |||
| 1066 | /* Maintain a stack of kboards, so other parts of Emacs | 1094 | /* Maintain a stack of kboards, so other parts of Emacs |
| 1067 | can switch temporarily to the kboard of a given frame | 1095 | can switch temporarily to the kboard of a given frame |
| 1068 | and then revert to the previous status. */ | 1096 | and then revert to the previous status. */ |
| @@ -10238,9 +10266,7 @@ void | |||
| 10238 | stuff_buffered_input (stuffstring) | 10266 | stuff_buffered_input (stuffstring) |
| 10239 | Lisp_Object stuffstring; | 10267 | Lisp_Object stuffstring; |
| 10240 | { | 10268 | { |
| 10241 | /* stuff_char works only in BSD, versions 4.2 and up. */ | 10269 | #ifdef SIGTSTP /* stuff_char is defined if SIGTSTP. */ |
| 10242 | #ifdef BSD_SYSTEM | ||
| 10243 | #ifndef BSD4_1 | ||
| 10244 | register unsigned char *p; | 10270 | register unsigned char *p; |
| 10245 | 10271 | ||
| 10246 | if (STRINGP (stuffstring)) | 10272 | if (STRINGP (stuffstring)) |
| @@ -10256,7 +10282,10 @@ stuff_buffered_input (stuffstring) | |||
| 10256 | 10282 | ||
| 10257 | /* Anything we have read ahead, put back for the shell to read. */ | 10283 | /* Anything we have read ahead, put back for the shell to read. */ |
| 10258 | /* ?? What should this do when we have multiple keyboards?? | 10284 | /* ?? What should this do when we have multiple keyboards?? |
| 10259 | Should we ignore anything that was typed in at the "wrong" kboard? */ | 10285 | Should we ignore anything that was typed in at the "wrong" kboard? |
| 10286 | |||
| 10287 | rms: we should stuff everything back into the kboard | ||
| 10288 | it came from. */ | ||
| 10260 | for (; kbd_fetch_ptr != kbd_store_ptr; kbd_fetch_ptr++) | 10289 | for (; kbd_fetch_ptr != kbd_store_ptr; kbd_fetch_ptr++) |
| 10261 | { | 10290 | { |
| 10262 | 10291 | ||
| @@ -10269,8 +10298,7 @@ stuff_buffered_input (stuffstring) | |||
| 10269 | } | 10298 | } |
| 10270 | 10299 | ||
| 10271 | input_pending = 0; | 10300 | input_pending = 0; |
| 10272 | #endif | 10301 | #endif /* SIGTSTP */ |
| 10273 | #endif /* BSD_SYSTEM and not BSD4_1 */ | ||
| 10274 | } | 10302 | } |
| 10275 | 10303 | ||
| 10276 | void | 10304 | void |