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
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:
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?
> Sincerely and kindest regards, Davin.
> Davin Pearson http://www.davinpearson.com
Alan Mackenzie (Nuremberg, Germany).