Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions doc/haskell-mode.texi
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,26 @@ selection mode (without redefining @kbd{C-x},@kbd{C-c},@kbd{C-v}, and
@kbd{C-z}) by calling @kbd{M-x cua-selection-mode} (or adding
@code{(cua-selection-mode nil)} to your @code{haskell-mode-hook}).

@section Region indent is a no-op

There is a @code{indent-region} function that supposedly could be used
to indent code region without changing its semantics. Sadly it does not
work that way because usual use case for @code{indent-region} is:

@enumerate
@item
Alter first line of code in region.
@item
Call @code{indent-region} to fix indentation for remaining lines.
@end enumerate

Note that between 1 and 2 program is already semantically broken and
knowing how to indent it preserving semantic from before step 1 would
require time travel.

To stay on the safe side @code{indent-region-function} is bound to a
no-op in @code{haskell-mode}.

@node External indentation
@chapter Other ways to indent code

Expand Down