From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Davin Pearson Newsgroups: gmane.emacs.help Subject: Re: Trouble fontifying /** ... */ Date: Thu, 29 Jan 2009 18:02:36 +1300 Message-ID: <8d7d1e6d0901282102jc6b276btc8f2f1609b07f335@mail.gmail.com> References: <8d7d1e6d0901252100r3d2c8f5p699cd67b8600fb07@mail.gmail.com> <20090126192020.GC1417@muc.de> <8d7d1e6d0901261804w2791a677xc71fbb74d118c00f@mail.gmail.com> <20090127091908.GA2116@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1233205393 12580 80.91.229.12 (29 Jan 2009 05:03:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 29 Jan 2009 05:03:13 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Alan Mackenzie Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 29 06:04:25 2009 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 1LSP4i-0002gD-45 for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Jan 2009 06:04:24 +0100 Original-Received: from localhost ([127.0.0.1]:45023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LSP3Q-0007vR-4g for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Jan 2009 00:03:04 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LSP33-0007vM-Nt for help-gnu-emacs@gnu.org; Thu, 29 Jan 2009 00:02:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LSP32-0007vA-U1 for help-gnu-emacs@gnu.org; Thu, 29 Jan 2009 00:02:41 -0500 Original-Received: from [199.232.76.173] (port=55918 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LSP32-0007v7-RZ for help-gnu-emacs@gnu.org; Thu, 29 Jan 2009 00:02:40 -0500 Original-Received: from ti-out-0910.google.com ([209.85.142.190]:46111) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LSP31-0008AP-Th for help-gnu-emacs@gnu.org; Thu, 29 Jan 2009 00:02:40 -0500 Original-Received: by ti-out-0910.google.com with SMTP id u5so3584763tia.10 for ; Wed, 28 Jan 2009 21:02:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=qamXwXYGQTb9DIweIn+RBXN/Z7zsUnVs2HXDEi1fxus=; b=p0ZF/JPy0Txthlt1F0nba+Vc7UdSjZDzN91vj4awZy85KOCtKE3uhCoKv8y9l90QYe 7m66Ko1rDA+Jwb1rN9cHX1CHI9eN93VMEs39zSVkBuxyM9vWBBpnQ6GgBaQYisgfCSRu 3GcWlN7JEkawDBCasvDDmernib0+2fOXTiOc0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=UcuSD53cvsdjFCxco8yJSxdHW80Zr2/CD+AGbJR83LnuNu3HsTC1Mmjagvo1BDJfEP Mym+tVfuEzq8n35PCflUZV7V/KizQducdkCUocYDJAg2vkWKdUY7ZnbcHUMOUWYGwWHJ 9bCpxyHDhcQgmgn4veVq4KtvDTa99iAqu9/EM= Original-Received: by 10.110.61.18 with SMTP id j18mr5985774tia.56.1233205356105; Wed, 28 Jan 2009 21:02:36 -0800 (PST) In-Reply-To: <20090127091908.GA2116@muc.de> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:61743 Archived-At: 2009/1/27 Alan Mackenzie : > 'Evening, Davin! > > On Tue, Jan 27, 2009 at 03:04:58PM +1300, Davin Pearson wrote: >> 2009/1/27 Alan Mackenzie : >> > "/*****..... " (minimum 2 stars) might look a bit like: >> > "/\\*\\*+" >> > > >> The following Elisp code only matches a single line comment >> >> ("/\\*\\*+.*\\*/" 0 'font-lock-doc-face t) > ^ > | > >> and erroneously fontifies > >> a = "/** foo */"; > >> in font-lock-doc-face when it should be font-lock-string-face. > > Ah! I see it now. The last element of that list, t, is the OVERRIDE > parameter which means "apply this fontification even if this piece of > buffer has already been fontified" (See page "Search-based > Fontification" in the Elisp manual). Of course, the string had already > been fontified with font-lock-string-face before that got overridden. > > So, you asked for it, you got it! Yes I already know about the override feature. The problem is that without the override feature it doesn't work at all. > If that t kind of sneaked in by accident while you weren't watching, > just take it out. If it was put there for a reason, well, you'll have > to jiggle things around, somehow - change the order of the elements in > font-lock-keywords, something like that. There'll be some way of making > it work, just like there's always a way of pressing the wallpaper flat > without the bubble of paste oozing up somewhere else. ;-) Help me! I am stuck! >> Click below for my Elisp code: (please note that I have updated the code) > >> http://h1.ripway.com/davin/sjs.el > >> Click below for a program fragment: > >> http://h1.ripway.com/davin/a.sjs > > Just as an aside, it's very helpful, really enourmously helpful, for > there to be a code fragment (as concise as possible, like the one above) > and relevant bits of Elisp (again concise, like the one above) actually > in the post in the mailing list. It encourages people to answer your > post rather than getting another cup of coffee. Downloading these from > a URL is more of a drag than you'd believe. ;-) What is so much of an effort clicking on a URL? It only takes a few seconds. -- Sincerely and kindest regards, Davin. Davin Pearson http://www.davinpearson.com