bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11865: Fwd: Re: 24.1.50; doxygen comments not highlighted in c++-mod


From: Lars Ingebrigtsen
Subject: bug#11865: Fwd: Re: 24.1.50; doxygen comments not highlighted in c++-mode
Date: Thu, 27 Jun 2019 17:10:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Toon Claes <toon@iotcl.com> writes:

> Hi Lars,
>
> Find the patch attached.
> The regexp is written to match:
> /** gtkdoc */
> /**
>  * gtkdoc
>  */
>
> And to not match:
> /*******/

Alan, can you comment on this patch?  It's about not recognising gtkdoc
comments in c++-mode: 

> * progmodes/cc-vars.el (c-doc-comment-style): Set gtkdoc the
> default for c++-mode.
> * progmodes/cc-fonts.el (gtkdoc-font-lock-keywords): Text inside
> GtkDoc comment can be on the same line as the comment start "/**".
> ---
>  ChangeLog.2                | 9 +++++++++
>  lisp/progmodes/cc-fonts.el | 2 +-
>  lisp/progmodes/cc-vars.el  | 5 +++--
>  3 files changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/ChangeLog.2 b/ChangeLog.2
> index 5253a92..7ba1872 100644
> --- a/ChangeLog.2
> +++ b/ChangeLog.2
> @@ -1,3 +1,12 @@
> +2016-03-10  Toon Claes <toon@iotcl.com>
> +
> +     Fix Bug#11865
> +
> +     * progmodes/cc-vars.el (c-doc-comment-style): Set gtkdoc the
> +     default for c++-mode.
> +     * progmodes/cc-fonts.el (gtkdoc-font-lock-keywords): Text inside
> +     GtkDoc comment can be on the same line as the comment start "/**".
> +
>  2016-03-04  Michael Albinus  <michael.albinus@gmx.de>
>  
>       Fix Bug#22859
> diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
> index a7097b9..6bbb8f4 100644
> --- a/lisp/progmodes/cc-fonts.el
> +++ b/lisp/progmodes/cc-fonts.el
> @@ -2515,7 +2515,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 a695718..9783516 100644
> --- a/lisp/progmodes/cc-vars.el
> +++ b/lisp/progmodes/cc-vars.el
> @@ -550,7 +550,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.
> @@ -560,7 +561,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/C++ 
> mode).
>  
>  The value may also be a list of doc comment styles, in which case all
>  of them are recognized simultaneously (presumably with markup cues

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]