-really- delete trailing whitespace in elisp

We have a guideline where I work to delete trailing whitespace from php files. I noticed the standard emacs whitespace-cleaning functions left a courtesy newline. Here is some elisp that will remove any number of these courtesy newlines which should appear in a file:

gist

here is how to integrate it into your .emacs:

gist

last update 2011-07-12