In the latest haskell-mode's manual,turn-on-haskell-indentation is described as follows:
Improved variation of turn-on-haskell-indent indentation mode. Rebinds RET and DEL, so that indentations can be set and deleted as if they were real tabs.
To me, haskell-indentation is more sensible about tab-width, so I prefer this indentation mode rather than haskell-indent.
But I found there are different behaviours other than RET and DEL (in haskell-mode-20131013, with Cocoa Emacs 2013-03-11)!
RET behaviour
If I use turn-on-haskell-indentation, delete key's behaviour disables Delete key's crucial behaviour.
Suppose I select (i.e. set region on) () in the below code and put the cursor right after (:
main = putStrLn ()
-- ~~^ cursor here
With turn-on-haskell-indent, If I press "Delete" Key, then () is deleted from source and I get the following:
But, with haskell-indentation, I get the following:
Only the character right before the cursor is deleted!
Function-name completion
In haskell-indent, it also completes the function name.
Suppose following situation:
fib :: Int -> Int
fib 0 = 1
-- ^ cursor here
When I hit C-j and TAB twice, haskell-indent completes the function name:
fib :: Int -> Int
fib 0 = 1
fib
But with haskell-indentation, function name is not completed!
I think above two difference is inconvenient, so I want haskell-indentation behaves like haskell-indent in this two situations.
In the latest haskell-mode's manual,
turn-on-haskell-indentationis described as follows:To me, haskell-indentation is more sensible about tab-width, so I prefer this indentation mode rather than haskell-indent.
But I found there are different behaviours other than
RETandDEL(in haskell-mode-20131013, with Cocoa Emacs 2013-03-11)!RETbehaviourIf I use
turn-on-haskell-indentation, delete key's behaviour disables Delete key's crucial behaviour.Suppose I select (i.e. set region on)
()in the below code and put the cursor right after(:With
turn-on-haskell-indent, If I press "Delete" Key, then()is deleted from source and I get the following:But, with
haskell-indentation, I get the following:Only the character right before the cursor is deleted!
Function-name completion
In
haskell-indent, it also completes the function name.Suppose following situation:
When I hit
C-jandTABtwice, haskell-indent completes the function name:But with haskell-indentation, function name is not completed!
I think above two difference is inconvenient, so I want
haskell-indentationbehaves likehaskell-indentin this two situations.