Mercurial > hg > xemacs-beta
diff 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 |
line wrap: on
line diff
--- a/src/console-msw.c Thu Jul 07 21:50:53 2005 +0000 +++ b/src/console-msw.c Fri Jul 08 08:27:34 2005 +0000 @@ -68,7 +68,7 @@ Lisp_Object Qtopmost; Lisp_Object Qyesno; Lisp_Object Qyesnocancel; -static Lisp_Object Qseen_characters = Qnil; +Lisp_Object Vmswindows_seen_characters; /* Lisp_Object Qabort; */ /* Lisp_Object Qcancel; */ @@ -206,16 +206,17 @@ CHECK_CHAR(key); - if (!(HASH_TABLEP(Qseen_characters))) + if (!(HASH_TABLEP(Vmswindows_seen_characters))) { /* All the keysym we deal with are character objects; therefore, we can use eq as the test without worrying. */ - Qseen_characters = make_lisp_hash_table (128, HASH_TABLE_NON_WEAK, - HASH_TABLE_EQ); + Vmswindows_seen_characters = make_lisp_hash_table (128, + HASH_TABLE_NON_WEAK, + HASH_TABLE_EQ); } /* Might give the user an opaque error if make_lisp_hash_table fails, but it shouldn't crash. */ - CHECK_HASH_TABLE(Qseen_characters); + CHECK_HASH_TABLE(Vmswindows_seen_characters); val = XCHAR(key); @@ -225,14 +226,14 @@ return Qnil; } - if (!NILP(Fgethash(key, Qseen_characters, Qnil))) + if (!NILP(Fgethash(key, Vmswindows_seen_characters, Qnil))) { return Qnil; } if (NILP (Flookup_key (Vcurrent_global_map, key, Qnil))) { - Fputhash(key, Qt, Qseen_characters); + Fputhash(key, Qt, Vmswindows_seen_characters); Fdefine_key (Vcurrent_global_map, key, Qself_insert_command); return Qt; } @@ -757,6 +758,9 @@ void vars_of_console_mswindows (void) { - Qseen_characters = Qnil; + DEFVAR_LISP ("mswindows-seen-characters", &Vmswindows_seen_characters /* +Hash table of non-ASCII characters the MS Windows subsystem has seen. +*/ ); + Vmswindows_seen_characters = Qnil; Fprovide (Qmswindows); }