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

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

Re: apply macro to region lines by name


From: Pranav Peshwe
Subject: Re: apply macro to region lines by name
Date: Tue, 6 Jul 2010 08:17:25 +0530

On Tue, Jul 6, 2010 at 8:10 AM, Suvayu Ali <fatkasuvayu+linux@gmail.com> wrote:
On Monday 05 July 2010 06:17 PM, Corey Foote wrote:

Thanks, but that only applies the macro to the last line of the region. I want it to apply it to every line within the region.


How about you mark the region, then `M-='. This runs `count-lines-region'. And then run `M-<no_of_lines> M-x foo'

Its not very clean but that should do it.


That will work fine provided that the macro itself contains a command to move to the next/previous line. Otherwise the same action will be done n times on the one line the macro was run on.

HTH.

-Pranav
 
--
Suvayu

Open source is the future. It sets us free.



reply via email to

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