[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swift-mode f39c05b 013/496: Tweak comment syntax
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swift-mode f39c05b 013/496: Tweak comment syntax |
Date: |
Sun, 29 Aug 2021 11:32:58 -0400 (EDT) |
branch: elpa/swift-mode
commit f39c05b05389896a16213d4fc0c0f0a107cbec91
Author: Chris Barrett <chris.d.barrett@me.com>
Commit: Chris Barrett <chris.d.barrett@me.com>
Tweak comment syntax
---
swift-mode.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/swift-mode.el b/swift-mode.el
index 69a9fdf..1e4fbf0 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -122,7 +122,8 @@
;; Mode definition.
-;; FIXME: Syntax table based on tuareg-mode. Not really tested.
+;; FIXME: Syntax table cobbled together from entries in tuareg-mode and
+;; fsharp-mode. Not really tested.
(defvar swift-mode-syntax-table
(let ((st (make-syntax-table)))
(modify-syntax-entry ?_ "_" st)
@@ -130,8 +131,14 @@
(modify-syntax-entry ?? ". p" st)
(modify-syntax-entry ?& ". p" st)
(modify-syntax-entry ?! ". p" st)
+
+ ;; C++-style comments (//)
(modify-syntax-entry ?/ ". 12b" st)
(modify-syntax-entry ?\n "> b" st)
+ ;; C-style comments (/* */)
+ (modify-syntax-entry ?/ "()1n" st)
+ (modify-syntax-entry ?* ". 23n" st)
+ (modify-syntax-entry ?/ ")(4n" st)
(dolist (c '(?$ ?% ?+ ?- ?/ ?: ?< ?= ?> ?@ ?^ ?|))
(modify-syntax-entry c "." st))
- [nongnu] branch elpa/swift-mode created (now 800efe2), ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 00001ea 009/496: Fix keywords list, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode e90cf5e 012/496: Set comment vars, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode f39c05b 013/496: Tweak comment syntax,
ELPA Syncer <=
- [nongnu] elpa/swift-mode 592a33f 021/496: Copy syntax table from rust-mode., ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 142c7db 023/496: Merge pull request #7 from syohex/fix-for-older-emacs, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 90802b5 041/496: Use lexical scoping, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 8641ebc 048/496: Mention old-school installation method, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 8e72839 004/496: Add basic syntax table, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 5274877 010/496: Add single-line comments to syntax table, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode d110515 011/496: Font lock tweaks, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 272473b 005/496: Remove currently unused mode map, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode cbb19f2 003/496: Add basic font-locking, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 7df8b6d 037/496: Remove dash.el dependency., ELPA Syncer, 2021/08/29