I like the ability to automatically byte compile my .emacs file but never had Emacs behave in a way that was acceptable to me. In particular, the interaction between debugging a .emacs file and automatic byte compile sometimes is troublesome. The solution for me which is least bad is to automatically byte compile on save of the .emacs buffer. To do this, add the following code to your .emacs.
(defun auto-recompile-emacs-file ()
(when (and buffer-file-name (string-match "\\.emacs" buffer-file-name))
(let ((byte-file (concat buffer-file-name "\\.elc")))
(if (or (not (file-exists-p byte-file))
(file-newer-than-file-p buffer-file-name byte-file))
(add-hook 'after-save-hook 'auto-recompile-emacs-file)
Sam Morar suggests a more general solution of automatically compiling after saving a lisp-mode buffer.
(add-hook 'emacs-lisp-mode-hook '(lambda ()
(add-hook 'after-save-hook 'emacs-lisp-byte-compile t t))
Michael Hoffman points out that one might not want to compile all lisp files. His suggestion is to compile only if a corresponding .elc file already exists.