M-x delete-trailing-whitespace RET