Skip to content

Better support for block comments #225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ivan-m opened this issue Dec 30, 2013 · 2 comments
Open

Better support for block comments #225

ivan-m opened this issue Dec 30, 2013 · 2 comments

Comments

@ivan-m
Copy link
Contributor

ivan-m commented Dec 30, 2013

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:

  • indent-region works with haskell-simple-indent
  • indent-region is explicitly disabled in haskell-indent and haskell-indentation (presumably because of tab-cycles, etc.).

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
Copy link
Contributor

gracjan commented Mar 1, 2015

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

@ivan-m
Copy link
Contributor Author

ivan-m commented Mar 1, 2015

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants