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.
This commit is contained in:
parent
f24d47359d
commit
6d529b658a
2 changed files with 4 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue