Skip to content

Commit bca871c

Browse files
authored
Merge pull request #9 from shaunplee/master
Add indentation support for `ado`.
2 parents 154ad16 + 55793cd commit bca871c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

purescript-indentation.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,8 @@ autofill-mode."
522522
"in" purescript-indentation-expression))))
523523
("do" . (lambda () (purescript-indentation-with-starter
524524
#'purescript-indentation-expression-layout nil)))
525+
("ado" . (lambda () (purescript-indentation-with-starter
526+
#'purescript-indentation-expression-layout nil)))
525527
("mdo" . (lambda () (purescript-indentation-with-starter
526528
#'purescript-indentation-expression-layout nil)))
527529
("rec" . (lambda () (purescript-indentation-with-starter
@@ -977,7 +979,7 @@ autofill-mode."
977979

978980
(defun purescript-indentation-peek-token ()
979981
"Return token starting at point."
980-
(cond ((looking-at "\\(if\\|then\\|else\\|let\\|in\\|mdo\\|rec\\|\\(?:[[:word:]]+\\.\\)*do\\|proc\\|case\\|of\\|where\\|module\\|deriving\\|data\\|type\\|newtype\\|class\\|instance\\)\\([^[:alnum:]'_]\\|$\\)")
982+
(cond ((looking-at "\\(if\\|then\\|else\\|let\\|in\\|ado\\|mdo\\|rec\\|\\(?:[[:word:]]+\\.\\)*do\\|proc\\|case\\|of\\|where\\|module\\|deriving\\|data\\|type\\|newtype\\|class\\|instance\\)\\([^[:alnum:]'_]\\|$\\)")
981983
(match-string-no-properties 1))
982984
((looking-at "[][(){}[,;]")
983985
(match-string-no-properties 0))

0 commit comments

Comments
 (0)