branch: elpa/swift-mode commit 69289fe79bf68a068728ceb401148282fd5f62c3 Author: ap4y <l...@pisem.net> Commit: ap4y <l...@pisem.net>
Lexer improvement: don't use implicit semicolon when ":" and "?" token is a last or first symbol on the line. Important for ternary operator. --- swift-mode.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swift-mode.el b/swift-mode.el index 7efd717..a8dca0b 100644 --- a/swift-mode.el +++ b/swift-mode.el @@ -197,8 +197,8 @@ (defun swift-smie--implicit-semi-p () (save-excursion - (not (or (memq (char-before) '(?\{ ?\[ ?, ?.)) - (looking-at "[ \n\t]+[.]") + (not (or (memq (char-before) '(?\{ ?\[ ?, ?. ?\? ?\:)) + (looking-at "[ \n\t]+[.?:]") (looking-back swift-smie--operators-regexp (- (point) 3) t) ))))