branch: elpa/swift-mode commit d42c53c43f446fe012d7c448e7b3d927a9b7c855 Author: ap4y <l...@pisem.net> Commit: ap4y <l...@pisem.net>
Use semantic smie function instead of regex for multi-line dot expression indentation --- swift-mode.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swift-mode.el b/swift-mode.el index f16fbe9..78d6ce1 100644 --- a/swift-mode.el +++ b/swift-mode.el @@ -274,10 +274,10 @@ ;; Apply swift-indent-multiline-statement-offset only if ;; - dot is followed by newline, or - ;; - have at least one whitespace character before dot + ;; - if dot is a first token on the line (`(:before . ".") (if (or (looking-at "[.][\n]") - (looking-back "[ \t\n]" 1 t)) + (smie-rule-bolp)) (smie-rule-parent swift-indent-multiline-statement-offset))) ;; Apply swift-indent-multiline-statement-offset if