* changing precedence in font-lock-add-keywords
@ 2006-11-21 20:23 sandro.dentella
2006-11-21 22:41 ` Reiner Steib
0 siblings, 1 reply; 2+ messages in thread
From: sandro.dentella @ 2006-11-21 20:23 UTC (permalink / raw)
Hi,
i'm trying to customize a mode for cheetah templating system, it is
derived from html-mode and seems pretty simple:
(define-derived-mode cheetah-mode html-mode "Cheetah"
(make-face 'cheetah-variable-face)
(font-lock-add-keywords
nil
'(
("\\(#\\(end \\)?\\(include.*\\|block.*\\|import\\|load\\)\\)" 1
font-lock-builtin-face)
("\\(##.*\\)" 1 font-lock-comment-face)
("\\(#\\*.*\\*#\\)" 1 font-lock-comment-face)
("\\(#\\(from\\|else\\|set\\|import\\|for\\|if\\|end\\)+\\)\\>" 1
font-lock-keyword-face)
("\\(<%.*%>\\)" 1 font-lock-keyword-face)
;;
("\\(#\\(from\\|for\\|end\\)\\).*\\<\\(for\\|import\\|if\\|in\\)\\>" 3
font-lock-keyword-face)
("\\(\\$\\(?:\\sw\\|}\\|{\\|\\s_\\)+\\)" 1
font-lock-variable-name-face)
))
(font-lock-mode 1)
)
what I'd like to optain is that the regexp defined here take precedence
over those defined in html-mode. As an example the line with <% %> gets
colored as it would in html but i'd like it to show as a keyword.
Any hints?
TIA
sandro
*:-)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: changing precedence in font-lock-add-keywords
2006-11-21 20:23 changing precedence in font-lock-add-keywords sandro.dentella
@ 2006-11-21 22:41 ` Reiner Steib
0 siblings, 0 replies; 2+ messages in thread
From: Reiner Steib @ 2006-11-21 22:41 UTC (permalink / raw)
On Tue, Nov 21 2006, sandro.dentella wrote:
> i'm trying to customize a mode for cheetah templating system, it is
> derived from html-mode and seems pretty simple:
Wrong list / newsgroup. This list is about Gnus.
Try help-gnu-emacs / gnu.emacs.help instead.
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-11-21 22:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-21 20:23 changing precedence in font-lock-add-keywords sandro.dentella
2006-11-21 22:41 ` Reiner Steib
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).