Good Haskell Style

Simon Marlow simonmarhaskell at
Thu Aug 2 06:10:22 EDT 2007

Thomas Schilling wrote:
> On 2 aug 2007, at 09.50, Simon Peyton-Jones wrote:
>> Is there an emacs mode or Lisp-blob that lets you use TAB to go to the 
>> next n-col boundary, but expands the jump into spaces.
>> In emacs modes, TAB usually does all sorts of other snazzy things 
>> concerning layout, which I don't want.  I just want something that 
>> behaves like old-fashioned TAB, but generates a file with spaces.
> This should work:
> ;; tabs are evil, always use spaces instead
> (setq indent-tabs-mode nil)
> ;; in your haskell-mode-hook:
>   (define-key haskell-mode-map [tab] 'indent-for-tab-command)

While we're on emacs... I know I can colour trailing whitespace 
differently, but that's just annoying.  What I want is: on lines that I 
edit, remove the trailing whitespace (and if I undo the edit, put the 
whitespace back too).  Is there something that does that?  I couldn't find it.


More information about the Libraries mailing list