emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/swift-mode 28c5b54 027/496: More improvements to comment h


From: ELPA Syncer
Subject: [nongnu] elpa/swift-mode 28c5b54 027/496: More improvements to comment handling
Date: Sun, 29 Aug 2021 11:33:01 -0400 (EDT)

branch: elpa/swift-mode
commit 28c5b54a73c7a22a5b453f25121612e445d7198a
Author: Chris Barrett <chris.d.barrett@me.com>
Commit: Chris Barrett <chris.d.barrett@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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]