Mercurial > emacs
comparison src/keyboard.c @ 83179:3864ee1088e9
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
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sun, 18 Jul 2004 21:49:24 +0000 |
parents | 6b4b299e2cd5 04a216bfa931 |
children | e657dca8261e |
comparison
equal
deleted
inserted
replaced
83178:a79c4db19c4f | 83179:3864ee1088e9 |
---|---|
789 /* Do nothing if we just printed a prompt. */ | 789 /* Do nothing if we just printed a prompt. */ |
790 if (current_kboard->echo_after_prompt | 790 if (current_kboard->echo_after_prompt |
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, |
797 build_string ("-")); | 812 build_string ("-")); |
798 echo_now (); | 813 echo_now (); |
1058 void | 1073 void |
1059 single_kboard_state () | 1074 single_kboard_state () |
1060 { | 1075 { |
1061 #ifdef MULTI_KBOARD | 1076 #ifdef MULTI_KBOARD |
1062 single_kboard = 1; | 1077 single_kboard = 1; |
1078 #endif | |
1079 } | |
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; | |
1063 #endif | 1091 #endif |
1064 } | 1092 } |
1065 | 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 |
10236 | 10264 |
10237 void | 10265 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)) |
10247 { | 10273 { |
10248 register int count; | 10274 register int count; |
10254 stuff_char ('\n'); | 10280 stuff_char ('\n'); |
10255 } | 10281 } |
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 |
10263 if (kbd_fetch_ptr == kbd_buffer + KBD_BUFFER_SIZE) | 10292 if (kbd_fetch_ptr == kbd_buffer + KBD_BUFFER_SIZE) |
10264 kbd_fetch_ptr = kbd_buffer; | 10293 kbd_fetch_ptr = kbd_buffer; |
10267 | 10296 |
10268 clear_event (kbd_fetch_ptr); | 10297 clear_event (kbd_fetch_ptr); |
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 |
10277 set_waiting_for_input (time_to_clear) | 10305 set_waiting_for_input (time_to_clear) |
10278 EMACS_TIME *time_to_clear; | 10306 EMACS_TIME *time_to_clear; |