[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 6d529b6: C++ Mode: change the default doc comment s
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] master 6d529b6: C++ Mode: change the default doc comment style from nothing to gtkdoc |
Date: |
Sun, 30 Jun 2019 11:04:25 -0400 (EDT) |
branch: master
commit 6d529b658a9bdfde219fce53b9d37623272fa3e8
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>
C++ Mode: change the default doc comment style from nothing to gtkdoc
Also amend a pertinent regular expression. This fixes bug #11865.
* lisp/progmodes/cc-vars.el (c-doc-comment-style): Insert an entry for
c++-mode, namely gtkdoc.
* lisp/progmodes/cc-fonts.el (gtkdoc-font-lock-keywords): Amend the regexp
recognizing the introductory "/**" to allow subsequent characters on that
line.
---
lisp/progmodes/cc-fonts.el | 2 +-
lisp/progmodes/cc-vars.el | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index 4e81b3b..96c3a6f 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -2798,7 +2798,7 @@ need for `pike-font-lock-extra-types'.")
(defconst gtkdoc-font-lock-keywords
`((,(lambda (limit)
- (c-font-lock-doc-comments "/\\*\\*$" limit
+ (c-font-lock-doc-comments "/\\*\\*\\([^\\*].*\\)?$" limit
gtkdoc-font-lock-doc-comments)
(c-font-lock-doc-comments "/\\*< " limit
gtkdoc-font-lock-doc-protection)
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el
index 79bd6a9..54d6347 100644
--- a/lisp/progmodes/cc-vars.el
+++ b/lisp/progmodes/cc-vars.el
@@ -563,7 +563,8 @@ variable in a mode hook."
(defcustom-c-stylevar c-doc-comment-style
'((java-mode . javadoc)
(pike-mode . autodoc)
- (c-mode . gtkdoc))
+ (c-mode . gtkdoc)
+ (c++-mode . gtkdoc))
"Specifies documentation comment style(s) to recognize.
This is primarily used to fontify doc comments and the markup within
them, e.g. Javadoc comments.
@@ -573,7 +574,7 @@ comment styles:
javadoc -- Javadoc style for \"/** ... */\" comments (default in Java mode).
autodoc -- Pike autodoc style for \"//! ...\" comments (default in Pike mode).
- gtkdoc -- GtkDoc style for \"/** ... **/\" comments (default in C mode).
+ gtkdoc -- GtkDoc style for \"/** ... **/\" comments (default in C and C++
modes).
The value may also be a list of doc comment styles, in which case all
of them are recognized simultaneously (presumably with markup cues
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 6d529b6: C++ Mode: change the default doc comment style from nothing to gtkdoc,
Alan Mackenzie <=