From: Toon Claes <toon@iotcl.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Toon Claes <toon@tonotdo.com>, 11865@debbugs.gnu.org
Subject: bug#11865: Fwd: Re: 24.1.50; doxygen comments not highlighted in c++-mode
Date: Thu, 10 Mar 2016 09:58:56 +0100 [thread overview]
Message-ID: <9D6D35E4-B589-4E47-8939-7D682F93AE74@iotcl.com> (raw)
In-Reply-To: <87d1rilrxu.fsf@gnus.org>
[-- Attachment #1.1: Type: text/plain, Size: 151 bytes --]
Hi Lars,
Find the patch attached.
The regexp is written to match:
/** gtkdoc */
/**
* gtkdoc
*/
And to not match:
/*******/
Kind regards,
Toon
[-- Attachment #1.2: 0001-Fix-Bug-11865.patch --]
[-- Type: application/octet-stream, Size: 2673 bytes --]
From 94c9c1c92f326de5e813780f8230f1ae3d4a6e96 Mon Sep 17 00:00:00 2001
From: Toon Claes <toon@iotcl.com>
Date: Thu, 10 Mar 2016 09:38:11 +0100
Subject: [PATCH] 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 "/**".
---
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
--
2.7.1
[-- Attachment #1.3: Type: text/plain, Size: 751 bytes --]
> On 27 Feb 2016, at 05:04, Lars Ingebrigtsen <larsi@gnus.org> wrote:
>
> Toon Claes <toon@iotcl.com> writes:
>
>> I do not really agree.
>>
>> Let me explain in detail.
>> Only comment blocks like the following were recognized as gtkdoc:
>> /**
>> * This is the gtkdoc comment
>> */
>>
>> I wanted also gtkdoc styling to be applied to:
>> /** This should be gtkdoc comment too */
>>
>> I admit, the regexp I wrote back in the day was not correctly escaped.
>> But I was trying to achieve comments with 3 or more asterisks would
>> not get styled like gtkdoc comments.
>
> Can you supply a patch that will give the correct styling?
>
> --
> (domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 842 bytes --]
next prev parent reply other threads:[~2016-03-10 8:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-05 11:46 bug#11865: 24.1.50; doxygen comments not highlighted in c++-mode Toon Claes
2012-07-06 14:00 ` Toon Claes
2012-07-10 6:59 ` Toon Claes
2016-02-24 6:29 ` Lars Ingebrigtsen
2013-06-05 8:24 ` bug#11865: Fwd: " Toon Claes
2016-02-26 3:37 ` Lars Ingebrigtsen
2016-02-26 8:03 ` Toon Claes
2016-02-27 4:04 ` Lars Ingebrigtsen
2016-03-10 8:58 ` Toon Claes [this message]
2019-06-27 15:10 ` Lars Ingebrigtsen
2019-06-28 9:19 ` Alan Mackenzie
2019-06-30 15:13 ` Alan Mackenzie
2019-07-01 7:49 ` Toon Claes
2019-07-03 2:36 ` Basil L. Contovounesios
2016-02-25 6:01 ` bug#11865: " Anders Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9D6D35E4-B589-4E47-8939-7D682F93AE74@iotcl.com \
--to=toon@iotcl.com \
--cc=11865@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=toon@tonotdo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).