record and play macro (someone had to mention)
C-x (
<type some magic />
C-x )
C-x e
M-x 99 C-x e
(play macro 99 times) C-x (
<type some magic />
C-x )
C-x e
M-x 99 C-x e
(play macro 99 times) C-u 0 C-x e
plays the macro until it rings the bell (e.g. runs out of buffer space or tries to forward-search for a name that doesn't exist. This is great when you don't know how many times it needs to be run.Actually, that would be M-9 M-9 C-x e or C-u 99 C-x e.