branch: elpa/swift-mode commit 4289bd7d2509ae4be2caa99468d00d5b825af593 Author: uk-ar <yuuki....@gmail.com> Commit: uk-ar <yuuki....@gmail.com>
Fix implicit semicolon rule --- swift-mode.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/swift-mode.el b/swift-mode.el index 2f61945..885bd2a 100644 --- a/swift-mode.el +++ b/swift-mode.el @@ -225,10 +225,10 @@ (looking-at "[ \n\t]+[.?:]") ;; Operators placed on the second line in multi-line expression ;; Should respect here possible comments strict before the linebreak - (and (looking-at - (concat "\\(\/\/.*\\)?\n[[:space:]]*" swift-smie--operators-regexp)) - (not (looking-at - (concat "\\(\/\/.*\\)?\n[[:space:]]*" "//")))) + (save-excursion + (forward-comment (buffer-size)) + (looking-at swift-smie--operators-regexp)) + (and (looking-back swift-smie--operators-regexp (- (point) 3) t) ;; Not a generic type (not (looking-back "[[:upper:]]>" (- (point) 2) t)))