From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Hansen Newsgroups: gmane.emacs.help Subject: Re: define multi-line comments Date: Fri, 20 Jun 2008 18:01:06 +0200 Organization: disorganized Message-ID: <87ve04qenx.fsf@localhorst.mine.nu> References: <87iqw4f9ki.fsf@literaturlatenight.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1213978253 26475 80.91.229.12 (20 Jun 2008 16:10:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Jun 2008 16:10:53 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 20 18:11:37 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K9jD7-0004uT-0e for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Jun 2008 18:11:37 +0200 Original-Received: from localhost ([127.0.0.1]:57407 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K9jCH-0006NE-LA for geh-help-gnu-emacs@m.gmane.org; Fri, 20 Jun 2008 12:10:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K9jA2-0004lj-GH for help-gnu-emacs@gnu.org; Fri, 20 Jun 2008 12:08:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K9jA0-0004jc-V6 for help-gnu-emacs@gnu.org; Fri, 20 Jun 2008 12:08:26 -0400 Original-Received: from [199.232.76.173] (port=45487 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K9jA0-0004jO-Od for help-gnu-emacs@gnu.org; Fri, 20 Jun 2008 12:08:24 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:58428 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K9jA0-0004Rz-9e for help-gnu-emacs@gnu.org; Fri, 20 Jun 2008 12:08:24 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1K9j9z-0003V7-8S for help-gnu-emacs@gnu.org; Fri, 20 Jun 2008 16:08:23 +0000 Original-Received: from e178034127.adsl.alicedsl.de ([85.178.34.127]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 20 Jun 2008 16:08:23 +0000 Original-Received: from david.hansen by e178034127.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 20 Jun 2008 16:08:23 +0000 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 21 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e178034127.adsl.alicedsl.de Mail-Copies-To: nobody User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:+3flAyERT0JfNM0LKSEhm0q8+Yk= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:54988 Archived-At: On Fri, 20 Jun 2008 16:46:37 +0200 henry atting wrote: > I have my own text mode (derived from text-mode), which defines some > syntax highlighting. Defining keywords is no problem but as far as I see > keywords don't work on serveral lines, e.g. this > > (list "\".*\"" 0 'font-lock-variable-name-face t) > > only highlights words or phrases till the line break. > Can anyone give me a hint how to get it work multi-line. There are some words about this in the Elisp manual, lookup `font-lock-multiline'. But this is incredible complicated. Good luck ;p But in many circumstances you can use `font-lock-syntactic-keywords' to make some region a "string" or "comment" and then use `font-lock-syntactic-face-function' to give it another face. David