Index: src/keyboard.c =================================================================== RCS file: /sources/emacs/emacs/src/keyboard.c,v retrieving revision 1.874 diff -c -r1.874 keyboard.c *** src/keyboard.c 27 Aug 2006 07:09:06 -0000 1.874 --- src/keyboard.c 7 Sep 2006 11:19:24 -0000 *************** *** 2504,2526 **** retry: reread = 0; - if (CONSP (Vunread_post_input_method_events)) - { - c = XCAR (Vunread_post_input_method_events); - Vunread_post_input_method_events - = XCDR (Vunread_post_input_method_events); - - /* Undo what read_char_x_menu_prompt did when it unread - additional keys returned by Fx_popup_menu. */ - if (CONSP (c) - && (SYMBOLP (XCAR (c)) || INTEGERP (XCAR (c))) - && NILP (XCDR (c))) - c = XCAR (c); - - reread = 1; - goto reread_first; - } - if (unread_command_char != -1) { XSETINT (c, unread_command_char); --- 2504,2509 ---- *************** *** 2552,2557 **** --- 2535,2557 ---- goto reread_for_input_method; } + if (CONSP (Vunread_post_input_method_events)) + { + c = XCAR (Vunread_post_input_method_events); + Vunread_post_input_method_events + = XCDR (Vunread_post_input_method_events); + + /* Undo what read_char_x_menu_prompt did when it unread + additional keys returned by Fx_popup_menu. */ + if (CONSP (c) + && (SYMBOLP (XCAR (c)) || INTEGERP (XCAR (c))) + && NILP (XCDR (c))) + c = XCAR (c); + + reread = 1; + goto reread_first; + } + if (CONSP (Vunread_input_method_events)) { c = XCAR (Vunread_input_method_events); *************** *** 11218,11225 **** DEFVAR_LISP ("unread-post-input-method-events", &Vunread_post_input_method_events, doc: /* List of events to be processed as input by input methods. ! These events are processed before `unread-command-events' ! and actual keyboard input without given to `input-method-function'. */); Vunread_post_input_method_events = Qnil; DEFVAR_LISP ("unread-input-method-events", &Vunread_input_method_events, --- 11218,11225 ---- DEFVAR_LISP ("unread-post-input-method-events", &Vunread_post_input_method_events, doc: /* List of events to be processed as input by input methods. ! These events are processed after `unread-command-events', but ! before actual keyboard input without given to `input-method-function'. */); Vunread_post_input_method_events = Qnil; DEFVAR_LISP ("unread-input-method-events", &Vunread_input_method_events, Index: src/ChangeLog =================================================================== RCS file: /sources/emacs/emacs/src/ChangeLog,v retrieving revision 1.5270 diff -c -0 -r1.5270 ChangeLog *** src/ChangeLog 6 Sep 2006 17:53:59 -0000 1.5270 --- src/ChangeLog 7 Sep 2006 11:19:34 -0000 *************** *** 0 **** --- 1,6 ---- + 2006-09-07 Michaël Cadilhac + + * keyboard.c (read_char): Read Vunread_post_input_method_events + after Vunread_command_events. + (syms_of_keyboard): Document it in `unread-post-input-method-events'. +