Skip to content

Improve docs for haskell-simple-indent. #434

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
Jan 18, 2015
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
18 changes: 13 additions & 5 deletions haskell-simple-indent.el
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,19 @@
;; Partly stolen from `indent-relative' in indent.el:
(defun haskell-simple-indent ()
"Space out to under next visible indent point.
Indent points are positions of non-whitespace following whitespace in
lines preceeding point. A position is visible if it is to the left of
the first non-whitespace of every nonblank line between the position and
the current line. If there is no visible indent point beyond the current
column, `tab-to-tab-stop' is done instead."

Indent points are positions of non-whitespace following
whitespace in lines preceeding point. Example:

func arg cx = when (isTrue) $ do
print 42
^ ^ ^ ^ ^ ^ ^ ^ ^ ^

A position is visible if it is to the left of the first
non-whitespace (indentation) of every nonblank line between the
position and the current line. If there is no visible indent
point beyond the current column, position given by
`indent-next-tab-stop' is used instead."
(interactive)
(let* ((start-column (current-column))
(invisible-from nil) ; `nil' means infinity here
Expand Down