From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Werner LEMBERG Newsgroups: gmane.emacs.devel Subject: line continuation and font-lock Date: Mon, 06 Feb 2006 09:20:24 +0100 (CET) Message-ID: <20060206.092024.45747502.wl@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1139214130 2219 80.91.229.2 (6 Feb 2006 08:22:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 6 Feb 2006 08:22:10 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 06 09:22:07 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F61dL-0004nC-32 for ged-emacs-devel@m.gmane.org; Mon, 06 Feb 2006 09:22:03 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F61gb-0003fW-Bb for ged-emacs-devel@m.gmane.org; Mon, 06 Feb 2006 03:25:25 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F61g4-0003aJ-Mk for emacs-devel@gnu.org; Mon, 06 Feb 2006 03:24:53 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F61g3-0003Zp-7l for emacs-devel@gnu.org; Mon, 06 Feb 2006 03:24:51 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F61g3-0003Zd-0M for emacs-devel@gnu.org; Mon, 06 Feb 2006 03:24:51 -0500 Original-Received: from [212.227.126.187] (helo=moutng.kundenserver.de) by monty-python.gnu.org with esmtp (Exim 4.52) id 1F61fZ-0000ZP-3K for emacs-devel@gnu.org; Mon, 06 Feb 2006 03:24:21 -0500 Original-Received: from [84.175.197.215] (helo=rigel.site) by mrelayeu.kundenserver.de (node=mrelayeu6) with ESMTP (Nemesis), id 0ML29c-1F61ci08yy-0004PX; Mon, 06 Feb 2006 09:21:24 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by rigel.site (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id k168KOT5021850 for ; Mon, 6 Feb 2006 09:20:25 +0100 Original-To: emacs-devel@gnu.org X-Mailer: Mew version 4.2.54 on Emacs 22.0.50.1 / Mule 5.0 (SAKAKI) X-Provags-ID: kundenserver.de abuse@kundenserver.de login:2dc398bc694a1e60948148ba0a42c0da X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:50091 Archived-At: I wonder how I can handle the line continuation character of groff in font-lock. Contrary to other languages, a trailing `\' is handled on the input level, before anything else. For example This is a \ .test is equal to This is a .test Similarly, .foo "This is a \ test" Is equal to .foo "This is a test" Consequently, for proper fontification, I have to handle trailing backslashes earlier than anything else, too. Looking into the documentation I wasn't able to find a method to do that. The nearest thing I can find is font-lock-syntactic keywords, but I have the feeling that this a)comes too late and b)is not appropriate, since backslashes are not limited to any synctical element. A possible solution might be to call a function which assigns a special text property to the newline character if preceded by `\' (basically an `ignore me' or `neutral' category) while doing fontification. Unfortunately, regular expressions don't have access to text properties... Any ideas? Werner