[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to add syntax highlighting inside comments for an existing major mod
From: |
Julien Barnier |
Subject: |
How to add syntax highlighting inside comments for an existing major mode |
Date: |
Thu, 11 Oct 2007 11:24:20 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Hi all,
I am trying to customize some syntax highlighting for an existing
major mode. What I would like to do is to display different type of
comments with different faces.
In this mode, comments are lines that begins with one or several
«#». What I would like to display differently those which begin with
«#####» than those which begin with «####», etc.
I tried the 'font-lock-add-keywords' way, but it doesn't seem to work
inside comments, with something like that :
(font-lock-add-keywords 'ess-mode
'(("^##### .*$" . my-beautiful-face)))
Do you have any idea for a proper way to do such a thing ?
Thanks in advance for any help.
--
Julien
- How to add syntax highlighting inside comments for an existing major mode,
Julien Barnier <=