From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/8245 Path: news.gmane.org!not-for-mail From: "sandro.dentella" Newsgroups: gmane.emacs.gnus.user Subject: changing precedence in font-lock-add-keywords Date: 21 Nov 2006 12:23:29 -0800 Organization: http://groups.google.com Message-ID: <1164140609.346638.45320@m73g2000cwd.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1164141812 18908 80.91.229.2 (21 Nov 2006 20:43:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 21 Nov 2006 20:43:32 +0000 (UTC) Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Tue Nov 21 21:43:30 2006 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GmcSZ-0007gp-V9 for gegu-info-gnus-english@m.gmane.org; Tue, 21 Nov 2006 21:43:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GmcSZ-0005Qq-DM for gegu-info-gnus-english@m.gmane.org; Tue, 21 Nov 2006 15:43:15 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!m73g2000cwd.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-Lines: 36 Original-NNTP-Posting-Host: 151.38.130.161 Original-X-Trace: posting.google.com 1164140615 20534 127.0.0.1 (21 Nov 2006 20:23:35 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 21 Nov 2006 20:23:35 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051007 Galeon/2.0.0 (Debian package 2.0.0-2),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: m73g2000cwd.googlegroups.com; posting-host=151.38.130.161; posting-account=5pj8_A0AAAAcvY3f2Jf9G78aXC6jAaZG Original-Xref: shelby.stanford.edu gnu.emacs.gnus:78430 Original-To: info-gnus-english@gnu.org X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:8245 Archived-At: 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 *:-)