diff options
| author | Alan Mackenzie | 2019-06-30 15:02:13 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2019-06-30 15:02:13 +0000 |
| commit | 6d529b658a9bdfde219fce53b9d37623272fa3e8 (patch) | |
| tree | bc5c54ca793604ec39080e57ea124e1343992d0c | |
| parent | f24d47359d9b6621215f20795d585c5024d91783 (diff) | |
| download | emacs-6d529b658a9bdfde219fce53b9d37623272fa3e8.tar.gz emacs-6d529b658a9bdfde219fce53b9d37623272fa3e8.zip | |
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.
| -rw-r--r-- | lisp/progmodes/cc-fonts.el | 2 | ||||
| -rw-r--r-- | 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 4e81b3b1e20..96c3a6f4a08 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el | |||
| @@ -2798,7 +2798,7 @@ need for `pike-font-lock-extra-types'.") | |||
| 2798 | 2798 | ||
| 2799 | (defconst gtkdoc-font-lock-keywords | 2799 | (defconst gtkdoc-font-lock-keywords |
| 2800 | `((,(lambda (limit) | 2800 | `((,(lambda (limit) |
| 2801 | (c-font-lock-doc-comments "/\\*\\*$" limit | 2801 | (c-font-lock-doc-comments "/\\*\\*\\([^\\*].*\\)?$" limit |
| 2802 | gtkdoc-font-lock-doc-comments) | 2802 | gtkdoc-font-lock-doc-comments) |
| 2803 | (c-font-lock-doc-comments "/\\*< " limit | 2803 | (c-font-lock-doc-comments "/\\*< " limit |
| 2804 | gtkdoc-font-lock-doc-protection) | 2804 | gtkdoc-font-lock-doc-protection) |
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index 79bd6a92950..54d634780ee 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el | |||
| @@ -563,7 +563,8 @@ variable in a mode hook." | |||
| 563 | (defcustom-c-stylevar c-doc-comment-style | 563 | (defcustom-c-stylevar c-doc-comment-style |
| 564 | '((java-mode . javadoc) | 564 | '((java-mode . javadoc) |
| 565 | (pike-mode . autodoc) | 565 | (pike-mode . autodoc) |
| 566 | (c-mode . gtkdoc)) | 566 | (c-mode . gtkdoc) |
| 567 | (c++-mode . gtkdoc)) | ||
| 567 | "Specifies documentation comment style(s) to recognize. | 568 | "Specifies documentation comment style(s) to recognize. |
| 568 | This is primarily used to fontify doc comments and the markup within | 569 | This is primarily used to fontify doc comments and the markup within |
| 569 | them, e.g. Javadoc comments. | 570 | them, e.g. Javadoc comments. |
| @@ -573,7 +574,7 @@ comment styles: | |||
| 573 | 574 | ||
| 574 | javadoc -- Javadoc style for \"/** ... */\" comments (default in Java mode). | 575 | javadoc -- Javadoc style for \"/** ... */\" comments (default in Java mode). |
| 575 | autodoc -- Pike autodoc style for \"//! ...\" comments (default in Pike mode). | 576 | autodoc -- Pike autodoc style for \"//! ...\" comments (default in Pike mode). |
| 576 | gtkdoc -- GtkDoc style for \"/** ... **/\" comments (default in C mode). | 577 | gtkdoc -- GtkDoc style for \"/** ... **/\" comments (default in C and C++ modes). |
| 577 | 578 | ||
| 578 | The value may also be a list of doc comment styles, in which case all | 579 | The value may also be a list of doc comment styles, in which case all |
| 579 | of them are recognized simultaneously (presumably with markup cues | 580 | of them are recognized simultaneously (presumably with markup cues |