Mercurial > hg > xemacs-beta
comparison src/console-msw.c @ 2850:ad0054aa11f1
[xemacs-hg @ 2005-07-08 08:27:32 by aidan]
Fix crash with C-h k C-g on MS Windows
author | aidan |
---|---|
date | Fri, 08 Jul 2005 08:27:34 +0000 |
parents | a25c824ed558 |
children | 4aebb0131297 |
comparison
equal
deleted
inserted
replaced
2849:bfb048b5938f | 2850:ad0054aa11f1 |
---|---|
66 Lisp_Object Qsystemmodal; | 66 Lisp_Object Qsystemmodal; |
67 Lisp_Object Qtaskmodal; | 67 Lisp_Object Qtaskmodal; |
68 Lisp_Object Qtopmost; | 68 Lisp_Object Qtopmost; |
69 Lisp_Object Qyesno; | 69 Lisp_Object Qyesno; |
70 Lisp_Object Qyesnocancel; | 70 Lisp_Object Qyesnocancel; |
71 static Lisp_Object Qseen_characters = Qnil; | 71 Lisp_Object Vmswindows_seen_characters; |
72 | 72 |
73 /* Lisp_Object Qabort; */ | 73 /* Lisp_Object Qabort; */ |
74 /* Lisp_Object Qcancel; */ | 74 /* Lisp_Object Qcancel; */ |
75 /* Lisp_Object Qignore; */ | 75 /* Lisp_Object Qignore; */ |
76 /* Lisp_Object Qno; */ | 76 /* Lisp_Object Qno; */ |
204 return Qnil; | 204 return Qnil; |
205 } | 205 } |
206 | 206 |
207 CHECK_CHAR(key); | 207 CHECK_CHAR(key); |
208 | 208 |
209 if (!(HASH_TABLEP(Qseen_characters))) | 209 if (!(HASH_TABLEP(Vmswindows_seen_characters))) |
210 { | 210 { |
211 /* All the keysym we deal with are character objects; therefore, we | 211 /* All the keysym we deal with are character objects; therefore, we |
212 can use eq as the test without worrying. */ | 212 can use eq as the test without worrying. */ |
213 Qseen_characters = make_lisp_hash_table (128, HASH_TABLE_NON_WEAK, | 213 Vmswindows_seen_characters = make_lisp_hash_table (128, |
214 HASH_TABLE_EQ); | 214 HASH_TABLE_NON_WEAK, |
215 HASH_TABLE_EQ); | |
215 } | 216 } |
216 /* Might give the user an opaque error if make_lisp_hash_table fails, | 217 /* Might give the user an opaque error if make_lisp_hash_table fails, |
217 but it shouldn't crash. */ | 218 but it shouldn't crash. */ |
218 CHECK_HASH_TABLE(Qseen_characters); | 219 CHECK_HASH_TABLE(Vmswindows_seen_characters); |
219 | 220 |
220 val = XCHAR(key); | 221 val = XCHAR(key); |
221 | 222 |
222 /* Same logic as in x_has_keysym; I'm not convinced it's sane. */ | 223 /* Same logic as in x_has_keysym; I'm not convinced it's sane. */ |
223 if (val < 0x80) | 224 if (val < 0x80) |
224 { | 225 { |
225 return Qnil; | 226 return Qnil; |
226 } | 227 } |
227 | 228 |
228 if (!NILP(Fgethash(key, Qseen_characters, Qnil))) | 229 if (!NILP(Fgethash(key, Vmswindows_seen_characters, Qnil))) |
229 { | 230 { |
230 return Qnil; | 231 return Qnil; |
231 } | 232 } |
232 | 233 |
233 if (NILP (Flookup_key (Vcurrent_global_map, key, Qnil))) | 234 if (NILP (Flookup_key (Vcurrent_global_map, key, Qnil))) |
234 { | 235 { |
235 Fputhash(key, Qt, Qseen_characters); | 236 Fputhash(key, Qt, Vmswindows_seen_characters); |
236 Fdefine_key (Vcurrent_global_map, key, Qself_insert_command); | 237 Fdefine_key (Vcurrent_global_map, key, Qself_insert_command); |
237 return Qt; | 238 return Qt; |
238 } | 239 } |
239 | 240 |
240 return Qnil; | 241 return Qnil; |
755 } | 756 } |
756 | 757 |
757 void | 758 void |
758 vars_of_console_mswindows (void) | 759 vars_of_console_mswindows (void) |
759 { | 760 { |
760 Qseen_characters = Qnil; | 761 DEFVAR_LISP ("mswindows-seen-characters", &Vmswindows_seen_characters /* |
762 Hash table of non-ASCII characters the MS Windows subsystem has seen. | |
763 */ ); | |
764 Vmswindows_seen_characters = Qnil; | |
761 Fprovide (Qmswindows); | 765 Fprovide (Qmswindows); |
762 } | 766 } |