From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: help with font-lock-multiline Date: Tue, 28 Sep 2004 16:38:24 GMT Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1096389539 32269 80.91.229.6 (28 Sep 2004 16:38:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 28 Sep 2004 16:38:59 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 28 18:38:55 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CCL0A-00059U-00 for ; Tue, 28 Sep 2004 18:38:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CCL6S-00012K-E5 for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Sep 2004 12:45:24 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!cyclone.bc.net!snoopy.risq.qc.ca!charlie.risq.qc.ca!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:Dv02+jOiI9HBzoP9ODyBNKBJ990= Original-Lines: 15 Original-NNTP-Posting-Host: 132.204.24.84 Original-X-Complaints-To: abuse@umontreal.ca Original-X-Trace: charlie.risq.qc.ca 1096389504 132.204.24.84 (Tue, 28 Sep 2004 12:38:24 EDT) Original-NNTP-Posting-Date: Tue, 28 Sep 2004 12:38:24 EDT Original-Xref: shelby.stanford.edu gnu.emacs.help:125572 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:20928 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:20928 > I'm doing JSP development, and I want something very simple. I want to > fontify the text between <% and %> tags, even if spread across multiple > lines. font-lock-multiline is probably not the right tool here (it works OK for things that are "generally single line, but something spread over a couple more lines", but for really long sections forget it). Your best bet is to mark <% and %> as string (or comment) delimiters in font-lock-syntactic-keywords. If you want to highlight them in a different face that the string-face or comment-face, then use font-lock-syntactic-face-function. Stefan