768 |
(skip-chars-forward "\t ") |
(skip-chars-forward "\t ") |
769 |
(cond |
(cond |
770 |
((looking-at "|") (current-indentation)) |
((looking-at "|") (current-indentation)) |
771 |
((and sml-case-indent (looking-at "of\\b")) |
((looking-at "of\\b") |
772 |
(1+ (current-indentation))) |
(1+ (current-indentation))) |
773 |
((looking-at "fn\\b") (1+ (current-indentation))) |
((looking-at "fn\\b") (1+ (current-indentation))) |
774 |
((looking-at "handle\\b") (+ (current-indentation) 5)) |
((looking-at "handle\\b") (+ (current-indentation) 5)) |
781 |
(sml-find-match-indent "in" "\\bin\\b" "\\blocal\\b\\|\\blet\\b")) |
(sml-find-match-indent "in" "\\bin\\b" "\\blocal\\b\\|\\blet\\b")) |
782 |
((looking-at "end\\b") ; Match the beginning |
((looking-at "end\\b") ; Match the beginning |
783 |
(sml-find-match-indent "end" "\\bend\\b" sml-end-starters-reg)) |
(sml-find-match-indent "end" "\\bend\\b" sml-end-starters-reg)) |
784 |
((and sml-nested-if-indent (looking-at "else[\t ]*if\\b")) |
((and sml-nested-if-indent (looking-at "else\\b")) |
785 |
(sml-re-search-backward "\\bif\\b\\|\\belse\\b") |
(sml-re-search-backward "\\bif\\b\\|\\belse\\b") |
786 |
(current-indentation)) |
(current-indentation)) |
787 |
((looking-at "else\\b") ; Match the if |
((looking-at "else\\b") ; Match the if |
789 |
((looking-at "then\\b") ; Match the if + extra indentation |
((looking-at "then\\b") ; Match the if + extra indentation |
790 |
(+ (sml-find-match-indent "then" "\\bthen\\b" "\\bif\\b" t) |
(+ (sml-find-match-indent "then" "\\bthen\\b" "\\bif\\b" t) |
791 |
sml-indent-level)) |
sml-indent-level)) |
792 |
((and sml-case-indent (looking-at "of\\b")) |
((looking-at "of\\b") |
793 |
(sml-re-search-backward "\\bcase\\b") |
(sml-re-search-backward "\\bcase\\b") |
794 |
(+ (current-column) 2)) |
(+ (current-column) 2)) |
795 |
((looking-at sml-starters-reg) |
((looking-at sml-starters-reg) |
851 |
(let ((indent (current-column))) |
(let ((indent (current-column))) |
852 |
(skip-chars-forward "\t (") |
(skip-chars-forward "\t (") |
853 |
(cond |
(cond |
854 |
|
;; a "let fun" or "let val" |
855 |
|
((looking-at "let \\(fun\\|val\\)\\b") |
856 |
|
(+ (current-column) 4 sml-indent-level)) |
857 |
;; Started val/fun/structure... |
;; Started val/fun/structure... |
858 |
((looking-at sml-indent-starters-reg) |
((looking-at sml-indent-starters-reg) |
859 |
(+ (current-column) sml-indent-level)) |
(+ (current-column) sml-indent-level)) |