Hi, I wrote a patch attached to make offsets around `where' configurable.
It introduces 2 new variables, haskell-indentation-where-pre-offset and haskell-indentation-where-post-offset. Both are set to 2 as default. They act as follows; ----------------------------------------------- myFun = do <w>print "hi" <w>print name <w1>where <w1><w2>name = "Mini Me" ----------------------------------------------- where w1 = haskell-indentation-where-pre-offset w2 = haskell-indentation-where-post-offset Could you confirm the patch and apply it to the main repo if it is OK? Thanks in advance, iquiw # Attached the patch again since my previous mail was not delivered to the list due to haskell.org down... On Thu, Jun 3, 2010 at 4:39 AM, Johan Tibell <[email protected]> wrote: > On Tue, Jun 1, 2010 at 11:59 AM, iquiw <[email protected]> wrote: >> >> Seems haskell mailing lists are not working now... >> >> I made the `amend-record' version of the previous patch, >> which, I think, fixes the nested-where problem. > > Works great. Saves me lots of frustration when editing Haskell code. What > are the chances to get the patch into the main repo? I think the style that > it support is common in practice; it's used in Real World Haskell for > example. > >> >> There is one known issue I have not figured out why. >> It needs 4 tab key presses to change (a) to (b) >> (a) >> -------------------------- >> foo = do >> bar >> where >> -------------------------- >> (b) >> -------------------------- >> foo = do >> bar >> where >> -------------------------- > > I think it has to do with having to press tab one extra time to cycle back > to the beginning of the set of possible indentations. I think this is normal > Emacs behavior. > >> >> OT: I have never used nested-where, what is the benefit? > > They're occasionally useful in nested function definitions. > Johan > >
where-offset-2.dpatch
Description: Binary data
_______________________________________________ Haskellmode-emacs mailing list [email protected] http://projects.haskell.org/cgi-bin/mailman/listinfo/haskellmode-emacs
