Hello, attaching patch to make the whitespace-cleanup and whitespace-cleanup-region functions add a final newline to a file if whitespace-style contains `missing-newline-at-eof I'm aware this somewhat replicates what setting `require-final-newline would do, but I think since whitespace.el with this configuration highlights this as an error, it should also clean it up when asked. Best wishes, Björn