Haskell has line comments starting with --
and multiline comments of the form {- ... -}
. I'd like to make auto-fill-mode work for both of those.
Currently line comments are auto-filled correctly:
-- abc abc abc abc abc abc abc abc abc abc abc abc abc
-- abc abc abc abc abc abc abc abc abc
but multiline comments are not:
{- abc abc abc abc abc abc abc abc abc abc abc abc abc
{- abc abc abc abc abc abc abc abc abc
it should be just with spaces:
{- abc abc abc abc abc abc abc abc abc abc abc abc abc
abc abc abc abc abc abc abc abc abc
current settings are:
(set (make-local-variable 'comment-start) "-- ")
(set (make-local-variable 'comment-padding) 0)
(set (make-local-variable 'comment-start-skip) "[-{]-[ \t]*")
(set (make-local-variable 'comment-end) "")
(set (make-local-variable 'comment-end-skip) "[ \t]*\\(-}\\|\\s>\\)")
How to set this up so that comment auto-fill works for both kinds of comments?
More about Haskell Mode: https://github.com/haskell/haskell-mode
adaptive-fill-function
. – Stefan Oct 19 '15 at 01:01