haskell / haskell-mode

Emacs mode for Haskell
http://haskell.github.io/haskell-mode/
GNU General Public License v3.0
1.33k stars 342 forks source link

Better support for block comments #225

Open ivan-m opened 10 years ago

ivan-m commented 10 years ago

Currently, if you have a paragraph in a block comment which is indented, doing M-q (i.e. fill-paragraph, which ends up calling haskell-fill-paragraph) will un-indent all but the first line (and the comments in haskell-fill-paragraph admit that "{- -} comments need some extra love."

I've been playing with this over the past few days without success: ultimately, what fails is that indent-line-function is dependent upon which indentation mode is chosen:

The only solution I can think of is to temporarily override fill-prefix; I've currently got some elisp that will find the first character in a paragraph (skipping over the {- comment starter, haddock markup (|, ^, and also list markers) but I'm not sure if this is a safe or sane thing to do... The problem with this would be, if we fill and then indent, the lines could extend past fill-column :/

gracjan commented 9 years ago

This issue report was last update in 2013. Is it still relevant to current code state?

ivan-m commented 9 years ago

Yes.