Description
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