[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

syntax highlighting

From: Bostjan Vilfan
Subject: syntax highlighting
Date: Sun, 15 Mar 2015 17:31:58 -0400

I am using a derivative of modula2.el
(authors: Michael Schmidt <michael@pbinfo.UUCP>
Tom Perrine <Perrin@LOGICON.ARPA>),
which sets up the
modula2 mode, and I adapted it for the  Oberon2 language. However,
I have a problem with syntax highlighting, and since I do not
know a lot about the font lock mode, I wonder if someone can
give me a quick hint regarding the following problem:

I would like to highlight Oberon2 comments, which start with "(*",
and end with "*)". Comments can also be recursive;
i.e., a comment can look like this:

(* bla bla (* bla bla bla *) bla bla *)

The way modula2.el is written (or, actually, my derived .el file), the
last "bla bla" string is not highlighted. What needs to be done to
fix this? Apparently, as things stand now highlighting is turned off
as soon as "*)" is encountered. Probably one needs to keep a count of
unmatched "(*" strings, and turn highlighting off only when this
count reaches 0. Any help would be appreciated.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]