Mercurial > emacs
comparison src/keyboard.c @ 56454:1e0c70660fff
(not_single_kboard_state): New function.
(stuff_buffered_input): Now no-op only if no SIGTSTP.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 17 Jul 2004 14:50:58 +0000 |
parents | 0ef3adf2dcd7 |
children | 04a216bfa931 |
comparison
equal
deleted
inserted
replaced
56453:b8b142a8e2c6 | 56454:1e0c70660fff |
---|---|
1085 single_kboard_state () | 1085 single_kboard_state () |
1086 { | 1086 { |
1087 #ifdef MULTI_KBOARD | 1087 #ifdef MULTI_KBOARD |
1088 single_kboard = 1; | 1088 single_kboard = 1; |
1089 #endif | 1089 #endif |
1090 } | |
1091 | |
1092 /* If we're in single_kboard state for kboard KBOARD, | |
1093 get out of it. */ | |
1094 | |
1095 void | |
1096 not_single_kboard_state (kboard) | |
1097 KBOARD *kboard; | |
1098 { | |
1099 if (kboard == current_kboard) | |
1100 single_kboard = 0; | |
1090 } | 1101 } |
1091 | 1102 |
1092 /* Maintain a stack of kboards, so other parts of Emacs | 1103 /* Maintain a stack of kboards, so other parts of Emacs |
1093 can switch temporarily to the kboard of a given frame | 1104 can switch temporarily to the kboard of a given frame |
1094 and then revert to the previous status. */ | 1105 and then revert to the previous status. */ |
10173 | 10184 |
10174 void | 10185 void |
10175 stuff_buffered_input (stuffstring) | 10186 stuff_buffered_input (stuffstring) |
10176 Lisp_Object stuffstring; | 10187 Lisp_Object stuffstring; |
10177 { | 10188 { |
10178 /* stuff_char works only in BSD, versions 4.2 and up. */ | 10189 #ifdef SIGTSTP /* stuff_char is defined if SIGTSTP. */ |
10179 #ifdef BSD_SYSTEM | |
10180 #ifndef BSD4_1 | |
10181 register unsigned char *p; | 10190 register unsigned char *p; |
10182 | 10191 |
10183 if (STRINGP (stuffstring)) | 10192 if (STRINGP (stuffstring)) |
10184 { | 10193 { |
10185 register int count; | 10194 register int count; |
10191 stuff_char ('\n'); | 10200 stuff_char ('\n'); |
10192 } | 10201 } |
10193 | 10202 |
10194 /* Anything we have read ahead, put back for the shell to read. */ | 10203 /* Anything we have read ahead, put back for the shell to read. */ |
10195 /* ?? What should this do when we have multiple keyboards?? | 10204 /* ?? What should this do when we have multiple keyboards?? |
10196 Should we ignore anything that was typed in at the "wrong" kboard? */ | 10205 Should we ignore anything that was typed in at the "wrong" kboard? |
10206 | |
10207 rms: we should stuff everything back into the kboard | |
10208 it came from. */ | |
10197 for (; kbd_fetch_ptr != kbd_store_ptr; kbd_fetch_ptr++) | 10209 for (; kbd_fetch_ptr != kbd_store_ptr; kbd_fetch_ptr++) |
10198 { | 10210 { |
10199 | 10211 |
10200 if (kbd_fetch_ptr == kbd_buffer + KBD_BUFFER_SIZE) | 10212 if (kbd_fetch_ptr == kbd_buffer + KBD_BUFFER_SIZE) |
10201 kbd_fetch_ptr = kbd_buffer; | 10213 kbd_fetch_ptr = kbd_buffer; |
10204 | 10216 |
10205 clear_event (kbd_fetch_ptr); | 10217 clear_event (kbd_fetch_ptr); |
10206 } | 10218 } |
10207 | 10219 |
10208 input_pending = 0; | 10220 input_pending = 0; |
10209 #endif | 10221 #endif /* SIGTSTP */ |
10210 #endif /* BSD_SYSTEM and not BSD4_1 */ | |
10211 } | 10222 } |
10212 | 10223 |
10213 void | 10224 void |
10214 set_waiting_for_input (time_to_clear) | 10225 set_waiting_for_input (time_to_clear) |
10215 EMACS_TIME *time_to_clear; | 10226 EMACS_TIME *time_to_clear; |