|
From: | Jan Djärv |
Subject: | Re: Emacs 23 Mac port |
Date: | Tue, 12 Jan 2010 10:28:46 +0100 |
User-agent: | Thunderbird 2.0.0.23 (X11/20090817) |
YAMAMOTO Mitsuharu skrev:
On Tue, 12 Jan 2010 09:16:23 +0100, Jan Djärv <address@hidden> said:This seems to be because Apple event handlers are bound in special-event-map. A similar behavior can be observed with dran-and-drop, which is also bound in special-event-map, even on the GTK+ build. 1. emacs -Q 2. Drag-and-drop some C file (such as foo.c) into the Emacs frame. 3. Click the Emacs frame title bar to get focus. 4. C-c C-e => not found though it is bound to c-macro-expand 5. C-c C-e => handled correctlyI've checked in a fix for this. Keymaps weren't recalculated after a command from the special event map was run.Thanks. But then a special event such as SIGUSR1 cancels an incomplete key sequence being typed. How about doing this only when the current buffer is changed by the special event?
It makes sense. Can you install it?A dnd in the middle of a key sequence would still cancel the sequence, but I guess we can't do any better in that case?
Jan D.
YAMAMOTO Mitsuharu address@hidden === modified file 'src/keyboard.c' *** src/keyboard.c 2010-01-12 08:42:52 +0000 --- src/keyboard.c 2010-01-12 08:46:27 +0000 *************** *** 3187,3192 **** --- 3187,3193 ---- int count = SPECPDL_INDEX (); record_single_kboard_state (); #endif + struct buffer *prev_buffer = current_buffer;last_input_event = c;Fcommand_execute (tem, Qnil, Fvector (1, &last_input_event), Qt); *************** *** 3205,3214 **** unbind_to (count, Qnil); #endif! /* The command may have changed the keymaps. Pretend there is input! in another keyboard and return. This will recalculate keymaps. */ ! c = make_number (-2); ! goto exit; }/* Handle things that only apply to characters. */--- 3206,3221 ---- unbind_to (count, Qnil); #endif! if (current_buffer != prev_buffer)! { ! /* The command may have changed the keymaps. Pretend there ! is input in another keyboard and return. This will ! recalculate keymaps. */ ! c = make_number (-2); ! goto exit; ! } ! else ! goto retry; }/* Handle things that only apply to characters. */
[Prev in Thread] | Current Thread | [Next in Thread] |