[Stefan just told me that this email got corrupted when I sent it, here it is again.] I attach a better patch, it uses a file-has-change-p function instead of a when-file-has-changed macro.