comparison 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
comparison
equal deleted inserted replaced
104234:e2940cb3d84e 104235:b729d024f6dc
1517 cancel_hourglass (); 1517 cancel_hourglass ();
1518 return Qnil; 1518 return Qnil;
1519 } 1519 }
1520 #endif 1520 #endif
1521 1521
1522 extern int nonundocount; /* Declared in cmds.c. */
1523
1522 Lisp_Object 1524 Lisp_Object
1523 command_loop_1 () 1525 command_loop_1 ()
1524 { 1526 {
1525 Lisp_Object cmd; 1527 Lisp_Object cmd;
1526 int lose; 1528 int lose;
1527 int nonundocount;
1528 Lisp_Object keybuf[30]; 1529 Lisp_Object keybuf[30];
1529 int i; 1530 int i;
1530 int prev_modiff = 0; 1531 int prev_modiff = 0;
1531 struct buffer *prev_buffer = NULL; 1532 struct buffer *prev_buffer = NULL;
1532 #if 0 /* This shouldn't be necessary anymore. --lorentey */ 1533 #if 0 /* This shouldn't be necessary anymore. --lorentey */
1538 current_kboard->Vlast_prefix_arg = Qnil; 1539 current_kboard->Vlast_prefix_arg = Qnil;
1539 Vdeactivate_mark = Qnil; 1540 Vdeactivate_mark = Qnil;
1540 waiting_for_input = 0; 1541 waiting_for_input = 0;
1541 cancel_echoing (); 1542 cancel_echoing ();
1542 1543
1543 nonundocount = 0;
1544 this_command_key_count = 0; 1544 this_command_key_count = 0;
1545 this_command_key_count_reset = 0; 1545 this_command_key_count_reset = 0;
1546 this_single_command_key_start = 0; 1546 this_single_command_key_start = 0;
1547 1547
1548 if (NILP (Vmemory_full)) 1548 if (NILP (Vmemory_full))
1896 start_hourglass (); 1896 start_hourglass ();
1897 } 1897 }
1898 #endif 1898 #endif
1899 1899
1900 nonundocount = 0; 1900 nonundocount = 0;
1901 if (NILP (current_kboard->Vprefix_arg)) 1901 if (NILP (current_kboard->Vprefix_arg)) /* FIXME: Why? --Stef */
1902 Fundo_boundary (); 1902 Fundo_boundary ();
1903 Fcommand_execute (Vthis_command, Qnil, Qnil, Qnil); 1903 Fcommand_execute (Vthis_command, Qnil, Qnil, Qnil);
1904 1904
1905 #ifdef HAVE_WINDOW_SYSTEM 1905 #ifdef HAVE_WINDOW_SYSTEM
1906 /* Do not check display_hourglass_p here, because 1906 /* Do not check display_hourglass_p here, because