Deleting trailing whitespace except in certain modes