Skip to content

Commit

Permalink
Merge pull request #317 from DemiMarie/patch-1
Browse files Browse the repository at this point in the history
Indent parenthesized if and match expressions properly
  • Loading branch information
monnier authored Feb 28, 2025
2 parents f661844 + 10bfb61 commit 1600fda
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tuareg.el
Original file line number Diff line number Diff line change
Expand Up @@ -2210,10 +2210,11 @@ Return values can be
(and (not (smie-rule-bolp))
(cond ((smie-rule-prev-p "d=")
(smie-rule-parent tuareg-default-indent))
((smie-rule-prev-p "begin") (smie-rule-parent)))))
((smie-rule-prev-p "begin" "(")
(smie-rule-parent)))))
((equal token "then") (smie-rule-parent))
((equal token "if") (if (and (not (smie-rule-bolp))
(smie-rule-prev-p "else"))
(smie-rule-prev-p "else" "(" "begin"))
(smie-rule-parent)))
((and (equal token "with") (smie-rule-parent-p "{"))
(smie-rule-parent))
Expand Down

0 comments on commit 1600fda

Please sign in to comment.