You can start recording a keyboard macro by typing:
C-x (
Do whatever you want and stop recording with:
C-x )
Then, you can select a region and type:
C-x C-k r
To apply the macro to the selected region.
Emacs Macros are a really powerful tool. Just think if you need to prepone/postpone a string to a group of lines, for example from:
First Line
Second Line
Third Line
To:
Discussion
No comments yet.