Good Haskell Style

David Roundy droundy at darcs.net
Thu Aug 2 13:17:02 EDT 2007


On Thu, Aug 02, 2007 at 11:10:22AM +0100, Simon Marlow wrote:
> 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.

This ought to be doable with a --prehook in darcs record, except that darcs
doesn't yet support prehooks.  It's nicer if done by the editor, though.
-- 
David Roundy
Department of Physics
Oregon State University


More information about the Libraries mailing list