haskell-mode icon indicating copy to clipboard operation
haskell-mode copied to clipboard

Why rebind RET instead of using indent-line-function and allowing newline-and-indent to work?

Open singpolyma opened this issue 5 years ago • 1 comments

I have a custom newline-and-indent for most modes, but for Haskell mode I have to first (haskell-indentation-mode 0) and then re-set my indent-line-function. Why not keep my RET binding and set normal indent-line-function for haskell indentation mode so that customisations to either the keybinding or that function don't get overridden?

singpolyma avatar Apr 21 '20 00:04 singpolyma

Good question. Probably nobody remembers at this point. The code in haskell-indentation-newline-and-indent does seem excessive. It looks like it mostly exists to call delete-horizontal-space, which is probably not appropriate, so I feel like some of the logic there should just move into the indent-line-function, at which point the regular newline-and-indent default binding for RET would work normally, as - presumably - would your custom code. I'm unlikely to work on this myself though, sorry.

purcell avatar Apr 21 '20 01:04 purcell