[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to enable the syntax highlighting for comments within files havi
From: |
A.Politz |
Subject: |
Re: How to enable the syntax highlighting for comments within files having a specific extension? |
Date: |
Thu, 27 Aug 2009 15:22:27 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Jul 16, 3:13 pm, bj <gento_distef...@hotmail.com> wrote:
>
> Here is the jou-mode.el file which I built on the basis of your
> tutorials:
[...]
>
> 2) I don't need the keywords, but if I remove the relevant entries in
> the jou-mode.el file
> (i.e. lines 9-12, 17), the commented lines are no longer in red.
>
> 3) if the comment string "/" is in the middle of a line, like the
> division sign in an expression,
> then the characters to the right of it are turned into red. Do you
> know how to avoid this?
>
> Thanks for your help
>
> gento
Use define-generic-mode, dude.
(define-generic-mode bj-journal-mode
'("//") ;; use double backslash
'("your" "keywords")
nil
'("\\.jou\\'")
nil)
The comment/uncomment functions come for free, usually on M-; .
I doubt, that the comment starter really is a single backslash,
because that would be silly.
-ap