Skip to content

Simple indent vs haskell-indentation when using autofill on comments #932

Closed
@joe9

Description

@joe9

Hello,

I use autofill on comments. When a comment is more than 70 characters long, autofill wraps the line into a different line and adds the "--" to the beginning of the new line.

For example
-- This is a comment line in haskell code and it is longer than 70 characters. After the 70th character, the line becomes

is converted to

-- This is a comment line in haskell code and it is longer than 70 characters.
-- After the 70th character, the line becomes

This is the code that does the above:
(defun haskell-init::comment-auto-fill ()
(setq-local comment-auto-fill-only-comments t)
(auto-fill-mode 1))
(add-hook 'haskell-mode-hook 'haskell-init::comment-auto-fill)

For some reason, the above indentation works fine with simple-indent but not with haskell-indentation.

With haskell-indentation, the above converted line is:
-- This is a comment line in haskell code and it is longer than 70 characters.
After the 70th character, the line becomes

Thanks

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