[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/d-mode 781a94d 068/346: Add doc-comment style that recogni
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/d-mode 781a94d 068/346: Add doc-comment style that recognizes doxygen and D doc-comments. |
Date: |
Sun, 29 Aug 2021 11:00:05 -0400 (EDT) |
branch: elpa/d-mode
commit 781a94d6146efd1c8e087a81d2bfa76c6876e5c5
Author: Dmitri Makarov <dmakarov@alumni.stanford.edu>
Commit: Dmitri Makarov <dmakarov@alumni.stanford.edu>
Add doc-comment style that recognizes doxygen and D doc-comments.
---
d-mode.el | 25 +++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)
diff --git a/d-mode.el b/d-mode.el
index bf96ae8..2dabd7a 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -137,16 +137,29 @@ operators."
(c-lang-defconst c-literal-start-regexp
;; Regexp to match the start of comments and string literals.
d "/[*+/]\\|\"\\|`")
-;;(c-lang-defconst c-comment-prefix-regexp d "//+\\|\\**")
-
-(c-lang-defconst c-doc-comment-start-regexp
- ;; doc comments for D use "///", "/**" or doxygen's "/*!" "//!"
- d "/\\*[*!]\\|//[/!]")
(c-lang-defconst c-block-prefix-disallowed-chars
;; Allow ':' for inherit list starters.
d (set-difference (c-lang-const c-block-prefix-disallowed-chars)
- '(?:)))
+ '(?:)))
+
+(defconst doxygen-font-lock-doc-comments
+ (let ((symbol "[a-zA-Z0-9_]+")
+ (header "^ \\* "))
+ `((,(concat header "\\(" symbol "\\):[ \t]*$")
+ 1 ,c-doc-markup-face-name prepend nil)
+ (,(concat symbol "()")
+ 0 ,c-doc-markup-face-name prepend nil)
+ (,(concat header "\\(" "@" symbol "\\):")
+ 1 ,c-doc-markup-face-name prepend nil)
+ (,(concat "[#%@]" symbol)
+ 0 ,c-doc-markup-face-name prepend nil))
+ ))
+
+(defconst doxygen-font-lock-keywords
+ `((,(lambda (limit)
+ (c-font-lock-doc-comments "/\\+[+!]\\|/\\*[*!]\\|//[/!]" limit
+ doxygen-font-lock-doc-comments)))))
;;----------------------------------------------------------------------------
- [nongnu] elpa/d-mode 441b866 134/346: tests: Actually test indentation for issue #39, (continued)
- [nongnu] elpa/d-mode 441b866 134/346: tests: Actually test indentation for issue #39, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode baf1669 138/346: tests: Add tests for issue #26., ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode e81e5f7 147/346: Register our syntax-propertize-function before calling c-common-init, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 739a31e 160/346: Fix imenu for functions with line comments before the body, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode e64d5fc 169/346: .travis.yml: Update with emacs-travis compatibility updates, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode b5d936d 178/346: Fix imenu hang with unterminated function declaration, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode df1edde 182/346: Fix imenu with extern declarations, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 3f34028 185/346: Fix imenu with AtAttributes, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode b7dc06e 186/346: Fix imenu with function non-template arg list on own line, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 1ec5880 188/346: Fix another bug related to `-delimited strings, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 781a94d 068/346: Add doc-comment style that recognizes doxygen and D doc-comments.,
ELPA Syncer <=
- [nongnu] elpa/d-mode 2ef7c5c 077/346: Add d-mode testing infrastructure., ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode e35790c 137/346: tests: Disable #39 test for Emacs <24.4 too, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 4f67ef2 143/346: Add self as maintainer, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 2de6f73 145/346: Fix indentation on Emacs 26, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 1407db2 163/346: Add enums to imenu, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode ace2970 164/346: Fix imenu for functions with parameters defaulting to function calls, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 8d0ed04 172/346: README: Use syntax highlighting in code blocks, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 026fceb 176/346: Update auto-mode-alist when run from init file (fixes #88) (#89), ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 385cda4 177/346: Fix extant checkdoc, byte-compilation and fontification warnings, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 86a86dd 110/346: Merge pull request #68 from sdilts/master, ELPA Syncer, 2021/08/29