Re: [gedit-list] syntax highlighting for fortran 95



On Sat, 2008-01-26 at 18:05 -0500, Nino R. Pereira wrote:
> Hi,
> 
> as a lover of gedit I want to bring to your attention an
> issue that I don't know how to address otherwise.
> 
> When using gedit for fortran source code, I like to turn on
> View > Highlight Mode > Sources > Fortran 95.
> 
> This turns all comment lines, those with a capital C or lower case
> c in column 1 blue. Often there is text on the comment line, in which
> case the next line is kept at its original color (depending on what
> it contains, a command, a declaration, etc.).
> But, when there is no text on a comment line, only a 'C' or 'c',
> the program colors the next line blue also, irrespective of what it
> contains, which makes it difficult to separate comments from commands
> by color only. You can sidestep this behavior easily by putting a blank
> behind the 'C', so that a comment line starts wtih 'C ' or 'c '.
> 
> I believe the fortran-95 standard is to use blank lines to separate
> blocks of code or text. However, programs originally written in fortran-77
> often used a single 'C' to separate blocks of code, since blank lines were
> somehow an anathema or forbidden or whatnot (I don't remember, and i didn't
> find a reason, it just 'was'). So, if you edit a legacy program with a lot
> of fortran-77 code you have to diddle with the comment lines to make the
> code stand out the way you want to.
> 
> Could you comment on this issue? I'm perfectly willing to change the
> comments in the code to conform to gedit's ideosynchrasies, but before I
> do and then pass the code to others I'd like to confirm that this is
> indeed a correct view of the situation.
> 
> Thank you,
> 

I think it's simply a bug in the fortran.lang syntax highlighting file
of gtksourceview. The regular expression which matches comments needs to
be made smarter. Please file a bug in bugzilla so that we can take care
of this issue.

Thanks for the feedback!

Paolo




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