Skip to content

Commit ad362a5

Browse files
committed
Merge pull request #434 from gracjan/pr-haskell-simple-indent-docs
Improve docs for haskell-simple-indent.
2 parents 66c9ea9 + e512200 commit ad362a5

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

haskell-simple-indent.el

+13-5
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,19 @@
8282
;; Partly stolen from `indent-relative' in indent.el:
8383
(defun haskell-simple-indent ()
8484
"Space out to under next visible indent point.
85-
Indent points are positions of non-whitespace following whitespace in
86-
lines preceeding point. A position is visible if it is to the left of
87-
the first non-whitespace of every nonblank line between the position and
88-
the current line. If there is no visible indent point beyond the current
89-
column, `tab-to-tab-stop' is done instead."
85+
86+
Indent points are positions of non-whitespace following
87+
whitespace in lines preceeding point. Example:
88+
89+
func arg cx = when (isTrue) $ do
90+
print 42
91+
^ ^ ^ ^ ^ ^ ^ ^ ^ ^
92+
93+
A position is visible if it is to the left of the first
94+
non-whitespace (indentation) of every nonblank line between the
95+
position and the current line. If there is no visible indent
96+
point beyond the current column, position given by
97+
`indent-next-tab-stop' is used instead."
9098
(interactive)
9199
(let* ((start-column (current-column))
92100
(invisible-from nil) ; `nil' means infinity here

0 commit comments

Comments
 (0)