0

I'm having trouble getting emacs to recognise a block comment as javadoc (for Doxygen-style comments) in a C file:

  • emacs -q

  • M-x emacs-version is 24.0.92.1 (i686-pc-linux-gnu, GTK+ Version 2.24.7) of 2011-12-21

  • Add the following to a c-mode buffer.

/** Not recognised as javadoc comment.
 *  @param[in] blah
 *  face: font-lock-comment-face
 */

/**
 *  Recognised as javadoc comment.
 *  @param[in] blah
 *  face: font-lock-doc-face
 */
  • In the first block comment C-u, C-x, = to get style (font-lock-comment-face).

  • In the second block comment C-u, C-x, = to get style (font-lock-doc-face).

So the question is, how do I get the first block comment to be recognised as javadoc so the correct faces are applied?

Drew
  • 29,895
  • 7
  • 74
  • 104
Ben
  • 1,339
  • 1
  • 11
  • 15
  • Could you not use java-mode instead of c-mode? – Thomas Jan 09 '12 at 05:09
  • @Thomas I've edited the original question to clarify. I'm editing C files with Doxygen comments for which emacs uses javadoc comment parsing. If there's a way to explicitly say "doxygen style comments please" then I'm all ears. – Ben Jan 09 '12 at 05:45

0 Answers0