help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

repeat the last command n times


From: Florian Kaufmann
Subject: repeat the last command n times
Date: 12 Mar 2006 05:59:15 -0800
User-agent: G2/0.2

Hello

I am searching for a command that repeats the last command n times. I
know there is repeat, usually bound to C-x z. However, if y want to
repeat the last command 12 times, I have to press z 12 times. Id rather
liked to enter 12 directly.
Using universal-argument, usually bound to C-u, also doesn't fit, since
its only an argument for the next command, and not in every case a
repeat count. For example I cant use it to repeat yank.
I thought I could write a little lisp function by myself and use the
command-history. But as its descriptions says it only contains commands
that read an argument from command line. It doesn't contain commands
like yank.
Using the output of view-lossage might be quite tricky, since I think
its not so easy to find out from this information which the last
command was.
Last but not least I could make use of keyboard macros. But then again,

(start-kbd-macro)[command-to-repeat](end-kbd-macro)(universal-argument)[repeat-count](call-last-kbd-macro)
seems quite more cumbersome than a simple
[command-to-repeat][my-super-repeat-command][repeat-count] or a
[my-super-repeat-next-command][repeat-command][command-to-repeat]

Any further ideas?

Greetings

Florian Kaufmann



reply via email to

[Prev in Thread] Current Thread [Next in Thread]