0

This comment gets font-lock-comment-face in C++ mode, but not in C mode:

/**
 *   \file test.cpp
 *
 */

If I add another * to /** -> /***, it's working in C-mode, too...

I'm not aware of any customisations, but I could be wrong.

Using CC Mode version 5.32.5 GNU Emacs 24.5.1 (x86_64-unknown-cygwin) of 2015-06-23 on desktop-new

1

The highlighting used is font-lock-doc-face, as the comment begins with ** and emacs recognizes this as javadoc. As you noted, using three stars, ore only one, will cause it to be treated as a regular comment.

You can use the shortcut C-u C-x = to get info on the current face, text properties are the last item so you may need to scroll the buffer that appears. It's very handy for troubleshooting these sorts of issues.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.