From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.help Subject: Re: Trouble fontifying /** ... */ Date: Mon, 26 Jan 2009 19:20:20 +0000 Message-ID: <20090126192020.GC1417@muc.de> References: <8d7d1e6d0901252100r3d2c8f5p699cd67b8600fb07@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1233002395 14176 80.91.229.12 (26 Jan 2009 20:39:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 Jan 2009 20:39:55 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Davin Pearson Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 26 21:41:07 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 1LRYGW-0004Nj-Ce for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Jan 2009 21:41:05 +0100 Original-Received: from localhost ([127.0.0.1]:38892 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LRYFE-0001tI-BG for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Jan 2009 15:39:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LRWiK-0002pq-By for help-gnu-emacs@gnu.org; Mon, 26 Jan 2009 14:01:40 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LRWiI-0002mK-LK for help-gnu-emacs@gnu.org; Mon, 26 Jan 2009 14:01:39 -0500 Original-Received: from [199.232.76.173] (port=55248 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LRWiI-0002m1-Fi for help-gnu-emacs@gnu.org; Mon, 26 Jan 2009 14:01:38 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:2387 helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LRWiH-00027i-AE for help-gnu-emacs@gnu.org; Mon, 26 Jan 2009 14:01:38 -0500 Original-Received: (qmail 78314 invoked by uid 3782); 26 Jan 2009 19:01:32 -0000 Original-Received: from acm.muc.de (pD9E23FB9.dip.t-dialin.net [217.226.63.185]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Mon, 26 Jan 2009 20:01:29 +0100 Original-Received: (qmail 10013 invoked by uid 1000); 26 Jan 2009 19:20:20 -0000 Content-Disposition: inline In-Reply-To: <8d7d1e6d0901252100r3d2c8f5p699cd67b8600fb07@mail.gmail.com> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.6-4.9 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:61665 Archived-At: Hi, Davin, On Mon, Jan 26, 2009 at 06:00:57PM +1300, Davin Pearson wrote: > I sent the following email to gnu.emacs.help but received no helpful > reply. If it's derived from Java Mode, then this is really one of mine. ;-) > I have invented a new (free GPL) programming language called SJS, > short for Simplified Java Syntax which provides a stepping stone for > learning Java, which makes it easier to learn Java than by learning > Java from scratch. While writing the major mode sjs-mode, I ran into > a problem highlighting /** ... */ in font-lock-doc-face. It might be worth checking any regexps you've got, making sure the '*'s are quoted right. They can be horribly tricky. ;-( A regexp to match "/*****..... " (minimum 2 stars) might look a bit like: "/\\*\\*+" > Click below for my Elisp code: > http://h1.ripway.com/davin/sjs.el OK, I've picked up the code. > To get the desired fontification online, I considered inheriting sjs- > mode from java-mode, but when you uncomment the line that says (java- > mode) it does fontify /** ... */ in font-lock-doc-face but it also > erroneously fontifies the "end" keyword in font-lock-type-face. This > behaviour is erroneous and I don't want for this to happen. I read > the documentation for font-lock-add-keywords but nothing I tried > eliminated the fontification of "end". Any chance you could give me something to chew on? A bit of SJS source (preferably quite concise) where the problem is apparent, together with a recipe for making it happen? Thanks! > -- > Sincerely and kindest regards, Davin. > Davin Pearson http://www.davinpearson.com -- Alan Mackenzie (Nuremberg, Germany).