branch: elpa/swift-mode commit 1753f23b36a0a2f9b1ec4647cae8157300a834c4 Merge: 4286ff9 d42c53c Author: Bozhidar Batsov <bozhidar.bat...@gmail.com> Commit: Bozhidar Batsov <bozhidar.bat...@gmail.com>
Merge pull request #53 from ap4y/improve_smie_dot_exp_rule 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 4cce2e1..452ca75 100644 --- a/swift-mode.el +++ b/swift-mode.el @@ -275,10 +275,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