The fix for #1489 (in 13f5a762) gives the temp buffer (where formatting is performed) a real buffer-file-name, which causes it to prompt to save it when it is killed.
13f5a762