by onedognight · 12y ago · 0 comments
This just mean you are "doing it wrong". Your .emacs file should not be loading anything, but instead setting things to be loaded when needed using autoload, eval-after-load and auto-mode-alist.
[1] http://flymake.sourceforge.net/
[2] http://ergoemacs.org/emacs/emacs_spell_checker_problems.html
C-0 M-x byte-recompile-directory
The C-0 prefix arg causes it to recompile everything without asking for confirmation for every file. (defun foo-compile-if-newer (path)
"A function suitable for hanging off `after-load-functions',
which will byte-compile an Emacs Lisp source file for which there
is no pre-existing compiled file, or there is a compiled file
older than the source."
(and (save-match-data
(not (null (string-match "el$" path))))
(let ((elc-path (byte-compile-dest-file path)))
(if (or (not (file-exists-p elc-path))
(time-less-p (nth 5 (file-attributes elc-path))
(nth 5 (file-attributes path))))
(progn
(message "Auto-%scompiling %s..."
(if (file-exists-p elc-path) "re" "") path)
(byte-compile-file path))))))
(add-hook 'after-load-functions
'foo-compile-if-newer)
Adding an exclusion list, if you feel the need for one, is left as an exercise for the reader.