M-x delete-trailing-whitespace