Saving macros
To save a macro into ~/.emacs
so that you will always be able to use
it, make ~/.emacs
the current file and do
M-x insert-kbd-macro RET <macroname> RET
This will convert the macro into Lisp for you. Doing
M-x 4 insert-kbd-macro RET <macroname> RET
will save the relevent key bindings too.