branch: elpa/swift-mode commit 28c5b54a73c7a22a5b453f25121612e445d7198a Author: Chris Barrett <chris.d.barr...@me.com> Commit: Chris Barrett <chris.d.barr...@me.com>
More improvements to comment handling --- swift-mode.el | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/swift-mode.el b/swift-mode.el index 07feb94..480bef2 100644 --- a/swift-mode.el +++ b/swift-mode.el @@ -174,8 +174,18 @@ (setq-local comment-end "") (setq-local tab-width 4) (setq-local indent-tabs-mode nil) - (setq-local comment-start-skip (rx "//" (* "/") (* space))) - ) + + (setq-local comment-start-skip + (rx (or (and "//" (* "/")) (and "/*" (* "*"))) (* space))) + + (setq-local paragraph-start + (rx-to-string `(and (* space) + (or (regex ,comment-start-skip) + (and "*" (? "/") (* space))) + eol) + t)) + + (setq-local paragraph-separate paragraph-start)) ;;;###autoload (add-to-list 'auto-mode-alist '("\\.swift$" . swift-mode))