From: Martin Rudalics Date: Wed, 29 Aug 2007 09:01:48 +0000 (+0000) Subject: (syms_of_keyboard): Set up new Lisp variable X-Git-Tag: emacs-pretest-22.1.90~882 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d0d3a31145231a520300d9360b74dcac60aa3930;p=emacs.git (syms_of_keyboard): Set up new Lisp variable last-repeatable-command. (init_kboard): Initialize Vlast_repeatable_command. (command_loop_1): Set it to real_this_command unless that was bound to an input event. (mark_kboards): Mark it. --- diff --git a/src/ChangeLog b/src/ChangeLog index 68383a34cdd..de94c9fb0a1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2007-08-29 Martin Rudalics + + * keyboard.h (struct kboard): New elt Vlast_repeatable_command. + + * keyboard.c (syms_of_keyboard): Set up new Lisp variable + last-repeatable-command. + (init_kboard): Initialize Vlast_repeatable_command. + (command_loop_1): Set it to real_this_command unless that was + bound to an input event. + (mark_kboards): Mark it. + 2007-08-28 Juanma Barranquero * image.c (syms_of_image) : diff --git a/src/keyboard.c b/src/keyboard.c index 171f2da7217..ea26e620892 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1536,6 +1536,8 @@ command_loop_1 () /* Do this after running Vpost_command_hook, for consistency. */ current_kboard->Vlast_command = Vthis_command; current_kboard->Vreal_last_command = real_this_command; + if (!CONSP (last_command_char)) + current_kboard->Vlast_repeatable_command = real_this_command; while (1) { @@ -1916,6 +1918,8 @@ command_loop_1 () { current_kboard->Vlast_command = Vthis_command; current_kboard->Vreal_last_command = real_this_command; + if (!CONSP (last_command_char)) + current_kboard->Vlast_repeatable_command = real_this_command; cancel_echoing (); this_command_key_count = 0; this_command_key_count_reset = 0; @@ -10970,6 +10974,7 @@ init_kboard (kb) kb->Voverriding_terminal_local_map = Qnil; kb->Vlast_command = Qnil; kb->Vreal_last_command = Qnil; + kb->Vlast_repeatable_command = Qnil; kb->Vprefix_arg = Qnil; kb->Vlast_prefix_arg = Qnil; kb->kbd_queue = Qnil; @@ -11457,6 +11462,11 @@ was a kill command. */); DEFVAR_KBOARD ("real-last-command", Vreal_last_command, doc: /* Same as `last-command', but never altered by Lisp code. */); + DEFVAR_KBOARD ("last-repeatable-command", Vlast_repeatable_command, + doc: /* Last command that may be repeated. +The last command executed that was not bound to an input event. +This is the command `repeat' will try to repeat. */); + DEFVAR_LISP ("this-command", &Vthis_command, doc: /* The command now being executed. The command can set this variable; whatever is put here @@ -11855,6 +11865,7 @@ mark_kboards () mark_object (kb->Voverriding_terminal_local_map); mark_object (kb->Vlast_command); mark_object (kb->Vreal_last_command); + mark_object (kb->Vlast_repeatable_command); mark_object (kb->Vprefix_arg); mark_object (kb->Vlast_prefix_arg); mark_object (kb->kbd_queue);