Patch Set 1: Abandoned

I think the current list consensus is we don't want to be performing this sort of code modification on the fly during file save.  So I'm abandoning this change, but we can always resurrect it in the future if the consensus changes.