[gedit-list] highlighting fortran syntax



Hi,

earlier I posted a question about a possible flaw in the highlighting
by gedit of the syntax in fortran95.

Gedit shows comment lines, all lines with a 'C' in the first column,
in blue. However, gedit also makes the line right below it blue
if the comment line has nothing more on it besides the 'C'.
However, if there's text the line that follows has the correct
colorization (depending on if it's a statement, a declaration,
what have you).

One way to avoid this problem is to add an extra blank (' ') to
comment lines. These then start with 'C '. But, this is not the
convention for fortran95.

There is another possible issue, viz., some fortrans seem to make
a distinction between a comment line that starts with a 'C' and
one that starts with a 'c'. I would have told you where I got this
from, but I can't remember it and I haven't found it again. Maybe
it's from GNU fortran, or from fortran2005....

I've gotten feedback that this problem doesn't occur in
gedit 2.20. My version comes with debian etch, it's 2.14.1.

FYI I give below the relevant part of my
/usr/share/gtksourceview-1.0/language-specs$fortran.lang:

"
<!-- Note: contains an hack to avoid considering ^COMMON a comment -->
    <line-comment _name = "Line Comment" style= "Comment">
        <start-regex>!|(^[Cc](\b|[^Oo]))</start-regex>
    </line-comment>
"

Sorry, I don't know enough to see if this line explains the issue
(but, I do understand that it treats 'C' and 'c' the same).

Could you let me know if it's a problem, or if it has already
been fixed, and if so what the solution is. I did download
the tar file for gedit 2.21.1, but didn't install just yet.

Thank you,

Nino


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