Changeset 4044
- Timestamp:
- 2006年02月24日 19時46分43秒 (2 years ago)
- Files:
-
- trunk/lisp/ChangeLog.Meadow (modified) (1 diff)
- trunk/lisp/international/meadow.el (modified) (1 diff)
- trunk/src/ChangeLog.Meadow (modified) (1 diff)
- trunk/src/mw32ime.c (modified) (6 diffs)
- trunk/src/mw32term.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lisp/ChangeLog.Meadow
r4039 r4044 1 2006-02-24 Kyotaro HORIGUCHI <horiguti@meadowy.org> 2 3 * international/meadow.el (mw32-input-method): Protect key strokes 4 around switching of fep from disordering and/or vanishing. 5 1 6 2006-02-21 Hideyuki SHIRAI <shirai@meadowy.org> 2 7 trunk/lisp/international/meadow.el
r4009 r4044 529 529 (let ((redisplay-dont-pause t)) 530 530 (sit-for 0)) 531 (mw32-protect-fep-input) 531 532 (fep-force-on) 532 533 (let* ((pos (point)) trunk/src/ChangeLog.Meadow
r4043 r4044 1 2006-02-24 Kyotaro HORIGUCHI <horiguti@meadowy.org> 2 3 * mw32ime.c (CHOKEDKEYBUFLEN): New macro. 4 (choke_keystroke): New variable. 5 (choked_key_index): New variable. 6 (choked_key_buf): New variable. 7 (mw32_ime_choke_keystroke): New function. 8 (mw32-ime-input-method-function): Protect key strokes around 9 switching of fep from disordering and/or vanishing. 10 (mw32-protect-fep-input): New lisp function. 11 12 * mw32term.c (mw32_message_loop<WM_KEYDOWN>): Protect key strokes 13 around switching of fep from disordering and/or vanishing. 14 1 15 2006-02-20 Kyotaro HORIGUCHI <horiguti@meadowy.org> 2 16 trunk/src/mw32ime.c
r4026 r4044 162 162 int mw32_fep_switch_by_key_event; 163 163 164 #define CHOKEDKEYBUFLEN 16 164 165 int IME_event_off_count; 165 166 static int last_ime_vkeycode; 166 167 static int last_ime_vkeymod; 168 static int choke_keystroke = FALSE; 169 static int choked_key_index = 0; 170 static char choked_key_buf [CHOKEDKEYBUFLEN]; 167 171 168 172 EXFUN (Fsubstring_no_properties, 3); … … 795 799 } 796 800 801 int 802 mw32_ime_choke_keystroke (int keycode) 803 { 804 if (! choke_keystroke 805 || keycode == 0 806 || choked_key_index >= CHOKEDKEYBUFLEN) return FALSE; 807 808 choked_key_buf[choked_key_index++] = keycode; 809 810 return TRUE; 811 } 812 797 813 void 798 814 mw32_ime_cancel_input_function (void) … … 850 866 ResetEvent (input_method_function_event); 851 867 868 Fmw32_protect_fep_input (); 852 869 Ffep_force_on (Qnil); 853 870 854 871 result = Qnil; 855 redisplay_preserve_echo_area (30);856 872 857 873 /* If new ascii (expected..) key event comes after this function … … 869 885 } 870 886 } 887 /* redisplay won't done when waiting keyevents exist. */ 888 redisplay_preserve_echo_area (30); 889 890 /* Key strokes after keystroke choking has turned on till here is 891 stored into choked_key_buf */ 892 if (choked_key_index > 0) 893 { 894 Lisp_Object args[2]; 895 args[0] = str; 896 args[1] = make_string (choked_key_buf, choked_key_index); 897 str = Fconcat (2, args); 898 } 899 choke_keystroke = FALSE; 900 choked_key_index = 0; 871 901 872 902 mw32_set_ime_conv_window (hwnd, … … 969 999 { 970 1000 return (make_number (((int)GetKeyboardLayout (0)) & 0xffff)); 1001 } 1002 1003 DEFUN ("mw32-protect-fep-input", Fmw32_protect_fep_input, Smw32_protect_fep_input, 0, 0, 0, 1004 doc: /* Start choking of fep-input to protect them from disordering 1005 on fep-swithing. 1006 This function is internal function for mw32-input-method. */) 1007 () 1008 { 1009 if (NILP (Ffep_get_mode ())) 1010 choke_keystroke = TRUE; 1011 1012 return Qnil; 971 1013 } 972 1014 … … 1890 1932 defsubr (&Smw32_ime_available); 1891 1933 defsubr (&Smw32_input_language_code); 1934 defsubr (&Smw32_protect_fep_input); 1892 1935 defsubr (&Sfep_force_on); 1893 1936 defsubr (&Sfep_force_off); trunk/src/mw32term.c
r4043 r4044 4627 4627 { 4628 4628 int vkey = mw32_ime_get_virtual_key (msg.hwnd); 4629 keyflag = 4630 mw32_emacs_translate_message (dpyinfo, 1, vkey, 4631 &keycode, &keymod); 4629 mw32_emacs_translate_message (dpyinfo, 1, vkey, 4630 &keycode, &keymod); 4632 4631 mw32_ime_record_keycode (keycode, keymod); 4632 if (mw32_ime_choke_keystroke (keycode)) 4633 break; 4633 4634 } 4634 4635 keyflag = mw32_emacs_translate_message (dpyinfo, 1, msg.wParam, 4635 4636 &keycode, &keymod); 4637 4638 if (keyflag ==1 && mw32_ime_choke_keystroke (keycode)) 4639 break; 4640 4636 4641 EVENT_INIT (*bufp); 4637 4642 MW32_INIT_EMACS_EVENT (*bufp);
