diff src/keyboard.c @ 104235:b729d024f6dc

* cmds.c (nonundocount): New global variable. (keys_of_cmds): Initialize it. (Fself_insert_command): Use it to combine upto 20 sequential chars into a single undo entry, just like the Qself_insert_command code in keyboard.c does. Call frame_make_pointer_invisible, also like the Qself_insert_command code in keyboard.c does. * keyboard.c (command_loop_1): Use the new global nonundocount rather than its own local replacement for it.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 12 Aug 2009 05:07:48 +0000
parents 6a4e411bd83b
children 19668aab4711
line wrap: on
line diff
--- a/src/keyboard.c	Tue Aug 11 23:26:04 2009 +0000
+++ b/src/keyboard.c	Wed Aug 12 05:07:48 2009 +0000
@@ -1519,12 +1519,13 @@
 }
 #endif
 
+extern int nonundocount;	/* Declared in cmds.c.  */
+
 Lisp_Object
 command_loop_1 ()
 {
   Lisp_Object cmd;
   int lose;
-  int nonundocount;
   Lisp_Object keybuf[30];
   int i;
   int prev_modiff = 0;
@@ -1540,7 +1541,6 @@
   waiting_for_input = 0;
   cancel_echoing ();
 
-  nonundocount = 0;
   this_command_key_count = 0;
   this_command_key_count_reset = 0;
   this_single_command_key_start = 0;
@@ -1898,7 +1898,7 @@
 #endif
 
             nonundocount = 0;
-            if (NILP (current_kboard->Vprefix_arg))
+            if (NILP (current_kboard->Vprefix_arg)) /* FIXME: Why?  --Stef  */
               Fundo_boundary ();
             Fcommand_execute (Vthis_command, Qnil, Qnil, Qnil);