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

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

RE: repeat the last command n times


From: Drew Adams
Subject: RE: repeat the last command n times
Date: Thu, 16 Mar 2006 20:36:30 -0800

    As John said, it works as indicated. That is, it doesn't work together
    with yank, because yank doesn't take the argument as a repeat count.
    The existence of an argument just tells yank that the point should be
    at the beginning of the inserted sequence after insertion. C-u 12 C-y
    doesn't make 12 yanks, but 1 yank with the point being at beginning of
    the inserted string. Now the documentation of repeat (that is C-x z)
    sais that it passes the argument to the command to be repeated. Thus
    C-y C-u 12 C-x z makes first a yank, then repeats it one time. After
    the second yank, the repeated one, the point will be at the beginning
    of the inserted string.

Thank you for making it clear, Florian. The main point is that the prefix
arg is passed to the previous command (the one that is repeated), and it is
that command that interprets the arg as it likes (as usual).

Actually, a prefix arg for `yank' is more complicated than what you
describe. A plain `C-u' (no number) has the effect you describe. But if a
number N is supplied, then `yank' inserts the Nth most recent entry in the
kill-ring. In the example given, `C-u 12 C-y' inserts the 12th most recently
killed span of text.






reply via email to

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