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

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

Re: syntax highlighting for comments


From: bj
Subject: Re: syntax highlighting for comments
Date: Tue, 15 Sep 2009 09:49:05 -0700 (PDT)
User-agent: G2/1.0

any idea?

On 8 Set, 10:26, gento <gento_distef...@hotmail.com> wrote:
> Hi All,
>
> I'm using emacs to edit journal text files *.jou, for which commented
> lines
> start with the character "/".
>
> I apply the comment syntax for the "*.jou" files by adding to
> the .emacs file
> the lines
>
> (add-hook 'find-file-hooks
>  (lambda ()
>   (when (string-match "\\.jou$" (buffer-file-name))
>    (setq comment-start "/")
>   )
>  )
> )
>
> Now I would also like to turn the text of the commented lines into
> red, and for this
> I added the line
>
> (font-lock-add-keywords nil '("\\(/.*\\)$" (1 font-lock-comment-
> face)))
>
> which unfortunately doesn’t work.
>
> Does anybody know where the mistake is?
> Many thanks
>
> gento



reply via email to

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