Greg Heartsfield home

Show and Destroy Whitespace

Unnecessary whitespace at the end of a line is my pet peeve, especially since darcs makes it so obvious at record time. This is a pretty straightforward way to highlight these characters in any emacs buffer containing haskell code (use a hook like first-change-hook if you want it to show up everywhere). Add the following to .emacs and enjoy:

(add-hook 'haskell-mode-hook
          '(lambda ()
             (setq show-trailing-whitespace t)))

And don’t forget M-x delete-trailing-whitespace for automatic cleanup.

Validate XHTML Validate CSS