Tuesday, May 3, 2011

Removing trailing whitespace in Emacs automatically..

http://www.emacswiki.org/emacs/DeletingWhitespace#toc3


To remove trailing whitespace from the entire buffer, use any of the following:
  • ‘M-x delete-trailing-whitespace’ (GnuEmacs version 21 or later). You can put this in ‘before-save-hook’ to ensure that your files have no trailing whitespace:
(add-hook 'before-save-hook 'delete-trailing-whitespace)

1 comment: