[Top][All Lists]

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

Re: Trouble fontifying /** ... */

From: Xah Lee
Subject: Re: Trouble fontifying /** ... */
Date: Fri, 9 Jan 2009 05:21:57 -0800 (PST)
User-agent: G2/1.0

On Jan 8, 8:54 pm, Davin Pearson <address@hidden> wrote:
> I have invented a language called SJS that it a mixture of Pascal and
> Java for easier learning of the Java language.  In sjs-mode
> I would like the following code:
> /**
>   I am a Javadoc-style comment.
> */
> To be fontified in font-lock-doc-face but I cannot find an elegant way
> to do this.  What follows is some Emacs version information,
> via report-emacs-bug:

your question is a FAQ but without much polished answer.

Emac's syntax tables for comments address only the following classes
of comment syntax

    * “# ...\n”. Start with a char to newline char.
    * “// ... \n”. Start with 2 identical chars to newline char.
    * “(* ... *)”. A matching pair chars with another char.
    * “/* ... */”. Two chars used in a ad hoc way as matching pair.

If your comment syntax is more complex, you cannot use syntax table
for it. You have to use font-lock-syntactic-keywords, and also you'll
need to implement your own comment-dwim.

• How To Add Comment Handling In Your Major Mode

See also Rick (rgb)'s experience, at



reply via email to

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