Skip to content

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

Closed
bezirg opened this Issue Oct 15, 2012 · 1 comment

3 participants

@bezirg
bezirg commented Oct 15, 2012

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?

@chrisdone
Haskell member

Not personally using any of the indentation modes. You should take ownership of this and submit a pull request, I don't think anyone else is doing to fix it otherwise.

@chrisdone chrisdone closed this May 19, 2013
@hvr hvr reopened this Jun 29, 2013
@purcell purcell closed this in #439 Jan 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.