Skip to content

Emacs24: haskell-indent-put-region-in-literate #88

Closed
@bezirg

Description

@bezirg

In archlinux/emacs24 and latest haskell-mode, "unliterating" bird-style code with
C-u haskell-indent-put-region-in-literate does not work. In debian/emacs23 and latest haskell-mode it works ok. Can somebody confirm this?

Looking at the command's definition in haskell-indent.el, it looks like comment-region does not behave as it is supposed to. Changing it from:

  (if (eq haskell-literate 'bird)                                                                               
      (let ((comment-start "> ")        ; Change dynamic bindings for                               
            (comment-start-skip "^> ?") ; comment-region.                                             
            (comment-end "")                                                                                    
            (comment-end-skip "\n")                                                                             
            (comment-style 'plain))                                                                             
        (comment-region beg end arg))  

to:

  (if (eq haskell-literate 'bird)
      (let ((comment-start "> ")        ; Change dynamic bindings for
            (comment-start-skip "^> ?") ; comment-region.
            (comment-end "")
            (comment-end-skip "\n")
            (comment-style 'plain))
        (if arg
            (uncomment-region beg end)
          (comment-region beg end)))

solves the problem. Any suggestions?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions