I used to obsess about byte compiling my Elisp files but then I realized that
- The only thing I ever byte compiled was my init.el and updates to the packages I load.
- Byte compiling your startup file makes no appreciable difference.
- Once I started using ELPA, it took care of compiling my packages.
As I result, I don’t worry about it much anymore. Still, many Emacs users are working on packages and do need to keep things compiled.
For those in that position, there are a couple of useful recent posts worth your time. First, Bozhidar Batsov over at the invaluable Emacs Redux has a nice post about byte compiling with some Elisp that automatically deletes old .elc
files when you save a new .el
file of the same name.
Second, Xah Lee has a another nice post on the subject that includes some Elisp that will automatically recompile an existing .elc
file when the corresponding .el
file is saved. This is probably the behavior you want so you should take a look at his code if you regularly compile your Elisp.