Skip to content

M-q does not work well for block comments #393

Closed
@jstolarek

Description

@jstolarek

Say I have a comment like this:

--   1. a bullet and lots of text in it so
--      that it spans several lines blah
--    blah blah blah

If I press M-q on the second line of the comment all lines in bullet (1) get indented like this:

--   1. a bullet and lots of text in it so
--      that it spans several lines blah
--      blah blah blah

However, if I convert that comment to block comment:

{-
   1. a bullet and lots of text in it so
      that it spans several lines blah
    blah blah blah
-}

and hit M-q on the second line of a comment it will reformat without indentation:

{-
   1. a bullet and lots of text in it so
that it spans several lines blah
blah blah blah
-}

This is mostly annoying and practically renders M-q unusable for block comments. And given that GHC's Notes are by convention kept in block comments this becomes a real pain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions