comparison src/event-stream.c @ 5689:7371081ce8f7

Have command remapping work interactively too, thank you Robert Pluim! src/ChangeLog addition: 2012-10-14 Aidan Kehoe <kehoea@parhasard.net> Have command remapping work interactively too, thank you Robert Pluim. * event-stream.c (Fdispatch_event): Obey command remapping here, it wasn't done for us. * keymap.c: * keymap.c (command_remapping_for_event): New, needed to observe command remapping interactively. * lisp.h: Make it available. lisp/ChangeLog addition: 2012-10-14 Aidan Kehoe <kehoea@parhasard.net> * help.el: * help.el (describe-function-1): Add some newlines here when dealing with remapped commands, thank you Robert Pluim.
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 14 Oct 2012 22:10:39 +0100
parents 56144c8593a8
children b490ddbd42aa
comparison
equal deleted inserted replaced
5688:b6c506c30f93 5689:7371081ce8f7
4548 else /* key sequence is bound to a command */ 4548 else /* key sequence is bound to a command */
4549 { 4549 {
4550 int magic_undo = 0; 4550 int magic_undo = 0;
4551 Elemcount magic_undo_count = 20; 4551 Elemcount magic_undo_count = 20;
4552 4552
4553 Vthis_command = leaf;
4554
4555 /* Don't push an undo boundary if the command set the prefix arg, 4553 /* Don't push an undo boundary if the command set the prefix arg,
4556 or if we are executing a keyboard macro, or if in the 4554 or if we are executing a keyboard macro, or if in the
4557 minibuffer. If the command we are about to execute is 4555 minibuffer. If the command we are about to execute is
4558 self-insert, it's tricky: up to 20 consecutive self-inserts may 4556 self-insert, it's tricky: up to 20 consecutive self-inserts may
4559 be done without an undo boundary. This counter is reset as 4557 be done without an undo boundary. This counter is reset as
4565 number 20 to something else. #### DOCUMENT THIS! */ 4563 number 20 to something else. #### DOCUMENT THIS! */
4566 4564
4567 if (SYMBOLP (leaf)) 4565 if (SYMBOLP (leaf))
4568 { 4566 {
4569 Lisp_Object prop = Fget (leaf, Qself_insert_defer_undo, Qnil); 4567 Lisp_Object prop = Fget (leaf, Qself_insert_defer_undo, Qnil);
4568 Lisp_Object remap = Qnil;
4569
4570 if (NATNUMP (prop)) 4570 if (NATNUMP (prop))
4571 { 4571 {
4572 magic_undo = 1; 4572 magic_undo = 1;
4573 if (FIXNUMP (prop)) 4573 if (FIXNUMP (prop))
4574 { 4574 {
4585 } 4585 }
4586 else if (!NILP (prop)) 4586 else if (!NILP (prop))
4587 magic_undo = 1; 4587 magic_undo = 1;
4588 else if (EQ (leaf, Qself_insert_command)) 4588 else if (EQ (leaf, Qself_insert_command))
4589 magic_undo = 1; 4589 magic_undo = 1;
4590
4591 remap = command_remapping_for_event (leaf, event);
4592 if (!NILP (remap))
4593 {
4594 leaf = remap;
4595 }
4590 } 4596 }
4597
4598 Vthis_command = leaf;
4591 4599
4592 if (!magic_undo) 4600 if (!magic_undo)
4593 command_builder->self_insert_countdown = 0; 4601 command_builder->self_insert_countdown = 0;
4594 if (NILP (XCONSOLE (console)->prefix_arg) 4602 if (NILP (XCONSOLE (console)->prefix_arg)
4595 && NILP (Vexecuting_macro) 4603 && NILP (Vexecuting_macro)