[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csharp-mode 5a7828f 298/459: Add xml like doc comments
From: |
ELPA Syncer |
Subject: |
[elpa] externals/csharp-mode 5a7828f 298/459: Add xml like doc comments font locking |
Date: |
Sun, 22 Aug 2021 13:59:48 -0400 (EDT) |
branch: externals/csharp-mode
commit 5a7828fe9a5151e76155ef98017036ca8ff5ac10
Author: Theodor Thornhill <theo@thornhill.no>
Commit: Theodor Thornhill <theo@thornhill.no>
Add xml like doc comments font locking
---
csharp-mode.el | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/csharp-mode.el b/csharp-mode.el
index 4a04b32..1f0c010 100644
--- a/csharp-mode.el
+++ b/csharp-mode.el
@@ -518,6 +518,30 @@
res))))
;;; End of monkey patch
+;;; Doc comments
+
+(defconst csharpxml-font-lock-doc-comments
+ ;; Most of this is taken from the javadoc example, however, we don't use the
+ ;; '@foo' syntax, so I removed that. Supports the XML tags only
+ `((,(concat "</?\\sw" ; XML tags.
+ "\\("
+ (concat "\\sw\\|\\s \\|[=\n\r*.:]\\|"
+ "\"[^\"]*\"\\|'[^']*'")
+ "\\)*>")
+ 0 ,c-doc-markup-face-name prepend nil)
+ ("&\\(\\sw\\|[.:]\\)+;" ; XML entities.
+ 0 ,c-doc-markup-face-name prepend nil)
+ (,(lambda (limit)
+ (c-find-invalid-doc-markup "[<>&]\\|{@" limit))
+ 0 'font-lock-warning-face prepend nil)))
+
+(defconst csharpxml-font-lock-keywords
+ `((,(lambda (limit)
+ (c-font-lock-doc-comments "///" limit
+ csharpxml-font-lock-doc-comments)))))
+
+;;; End of doc comments
+
(defvar csharp-mode-syntax-table
(funcall (c-lang-const c-make-mode-syntax-table csharp))
"Syntax table used in csharp-mode buffers.")
@@ -552,6 +576,7 @@ Key bindings:
(c-common-init 'csharp-mode)
(easy-menu-add csharp-menu)
(c-set-style "csharp")
+ (setq-local c-doc-comment-style '((csharp-mode . csharpxml)))
(c-run-mode-hooks 'c-mode-common-hook 'csharp-mode-hook))
(provide 'csharp-mode)
- [elpa] externals/csharp-mode 274dd88 273/459: Update CI-settings, (continued)
- [elpa] externals/csharp-mode 274dd88 273/459: Update CI-settings, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode e7e96e3 272/459: Fixed callback indentation level. (#145), ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 85d36e1 280/459: Fix lambda indentation #105, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 4885177 286/459: Merge pull request #161 from ryuslash/fix-package-fontification, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 5a9c8eb 287/459: Merge pull request #159 from ronnieholm/master, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f640019 285/459: Fix display of ‘package’ as any sort of name, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 7cb8d05 288/459: Update CI settings:, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 44740eb 282/459: Fix font lock breaks on strings #151, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f6314e5 295/459: Merge pull request #166 from josteink/rework, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode da8eab4 290/459: const is a modifier, not a type., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 5a7828f 298/459: Add xml like doc comments font locking,
ELPA Syncer <=
- [elpa] externals/csharp-mode e0a2975 296/459: This is clearly a new version! Lets make it 0.10.0, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 8af265d 302/459: Change licenses inside the .el files also, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode a753601 308/459: Add delegate to keywords, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode b928233 304/459: Add matchers-before and matchers-after, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f774b55 311/459: Add test for function fontification, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode d458586 316/459: Use c-typeof-kwds, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode d9d257c 325/459: Add compilation-mode support for dotnet core &/ nuget errors., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 15bc3cb 326/459: Add support for dotnet test failures., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode f4a0693 328/459: Richer font highlighting, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 82bcec9 329/459: Add missing LinQ keywords, ELPA Syncer, 2021/08/22