Skip to content

Make haskell-indent-region do nothing #1193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 9, 2016
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
15 changes: 11 additions & 4 deletions haskell-indentation.el
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,17 @@ indentation points to the right, we switch going to the left."
(t nil)))

(defun haskell-indentation-indent-region (start end)
"Indent region from START to END."
(setq haskell-indentation-dyn-last-direction 'region)
(haskell-indentation-indent-rigidly start end 1)
(message "Press TAB or S-TAB again to indent the region more"))
"This function does nothing.

It is better to do nothing to indent region in Haskell than to
break the semantics of indentation. This function is used for
`indent-region-function' because the default is to call
`indent-line-function' on every line from START to END and that
also produces catastrophic results.

Someday we will have indent region that preserves semantics and
fixes up only indentation."
nil)

(defun haskell-indentation-indent-backwards ()
"Indent the current line to the previous indentation point."
Expand Down