Defindit Docs and Howto Home
See emacs_macro_examples.txt emacs_macro_examples.html
for use of registers whichs makes counting in a macro easier.
C-s ;; search-forward
[ ;; self-insert-command
RET ;; newline
C-SPC ;; set-mark-command
C-s ;; search-forward
] ;; self-insert-command
RET ;; newline
C-b ;; backward-char
C-w ;; kill-region
ESC : ;; eval-expression
(insert-string ;; self-insert-command * 14
SPC ;; self-insert-command
xx) ;; self-insert-command * 3
RET ;; newline
ESC : ;; eval-expression
(setq ;; self-insert-command * 5
SPC ;; self-insert-command
xx ;; self-insert-command * 2
SPC ;; self-insert-command
(+ ;; self-insert-command * 2
SPC ;; self-insert-command
1 ;; self-insert-command
SPC ;; self-insert-command
xx)) ;; self-insert-command * 4
RET ;; newline
C-a ;; beginning-of-line
C-n ;; next-line