* fortran line width & comment
@ 2007-06-07 12:58 tunti
0 siblings, 0 replies; 7+ messages in thread
From: tunti @ 2007-06-07 12:58 UTC (permalink / raw)
To: Help-gnu-emacs
Hi!
I edit fortran files with emacs. commented lines are coloured and everything
else works nice, but one thing makes me crazy:
when line reaches width greater than 72 characters, the rest of the line is
considered as comment. this messes up the colouring of the rest of the lines
in the file.
is there any way to me to make emacs NOT colour the rest of the line as a
comment ?
thanks a lot in advance!
-tunti
--
View this message in context: http://www.nabble.com/fortran-line-width---comment-tf3883719.html#a11007454
Sent from the Emacs - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <mailman.1731.1181224869.32220.help-gnu-emacs@gnu.org>]
* Re: fortran line width & comment
[not found] <mailman.1731.1181224869.32220.help-gnu-emacs@gnu.org>
@ 2007-06-07 19:26 ` Glenn Morris
2007-06-12 14:10 ` Stefan Monnier
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Glenn Morris @ 2007-06-07 19:26 UTC (permalink / raw)
To: help-gnu-emacs
tunti wrote:
> I edit fortran files with emacs. commented lines are coloured and
> everything else works nice, but one thing makes me crazy:
>
> when line reaches width greater than 72 characters, the rest of the
> line is considered as comment. this messes up the colouring of the
> rest of the lines in the file.
>
> is there any way to me to make emacs NOT colour the rest of the line
> as a comment ?
(setq fortran-font-lock-syntactic-keywords
'(("^[cd\\*]" 0 (11))))
Or copy the definition from fortran.el and change "71" in the second
element to whatever value you want. It should be easier to customize
this, sorry.
Or use f90-mode rather than fortran-mode if you are actually writing
free-form code.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: fortran line width & comment
2007-06-07 19:26 ` Glenn Morris
@ 2007-06-12 14:10 ` Stefan Monnier
2007-06-12 19:32 ` Glenn Morris
2008-07-18 14:44 ` berniep
[not found] ` <mailman.15010.1216429221.18990.help-gnu-emacs@gnu.org>
2 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2007-06-12 14:10 UTC (permalink / raw)
To: help-gnu-emacs
>> I edit fortran files with emacs. commented lines are coloured and
>> everything else works nice, but one thing makes me crazy:
>>
>> when line reaches width greater than 72 characters, the rest of the
>> line is considered as comment. this messes up the colouring of the
>> rest of the lines in the file.
>>
>> is there any way to me to make emacs NOT colour the rest of the line
>> as a comment ?
> (setq fortran-font-lock-syntactic-keywords
> '(("^[cd\\*]" 0 (11))))
> Or copy the definition from fortran.el and change "71" in the second
> element to whatever value you want. It should be easier to customize
> this, sorry.
> Or use f90-mode rather than fortran-mode if you are actually writing
> free-form code.
How could Emacs tell what is the value to use instead of 72 (or that there
is not such value at all)? I.e. how do compilers know whether to interpret
the code as f77 or something else?
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: fortran line width & comment
2007-06-12 14:10 ` Stefan Monnier
@ 2007-06-12 19:32 ` Glenn Morris
0 siblings, 0 replies; 7+ messages in thread
From: Glenn Morris @ 2007-06-12 19:32 UTC (permalink / raw)
To: help-gnu-emacs
Stefan Monnier wrote:
> How could Emacs tell what is the value to use instead of 72 (or that
> there is not such value at all)? I.e. how do compilers know whether
> to interpret the code as f77 or something else?
I think that for distinguishing free and fixed form code, compilers
just go by file extension, which is what Emacs does too. But compilers
also tend to have an option (eg g77 has -ffixed-line-length-N) whereby
the line-length of fixed form can be specified as something other than
the default 72 (often 132). I keep meaning to add an emacs variable
that has the same effect.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: fortran line width & comment
2007-06-07 19:26 ` Glenn Morris
2007-06-12 14:10 ` Stefan Monnier
@ 2008-07-18 14:44 ` berniep
[not found] ` <mailman.15010.1216429221.18990.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 7+ messages in thread
From: berniep @ 2008-07-18 14:44 UTC (permalink / raw)
To: Help-gnu-emacs
I tried the "setq" directive and it doesn't work for me. I don't see anywhree
in the fortran.el where this is defined.
Has this or any other solution worked for anyoone?
Using emacs 21.3.1 on Redhat.
Glenn Morris-5 wrote:
>
> tunti wrote:
>
>> I edit fortran files with emacs. commented lines are coloured and
>> everything else works nice, but one thing makes me crazy:
>>
>> when line reaches width greater than 72 characters, the rest of the
>> line is considered as comment. this messes up the colouring of the
>> rest of the lines in the file.
>>
>> is there any way to me to make emacs NOT colour the rest of the line
>> as a comment ?
>
> (setq fortran-font-lock-syntactic-keywords
> '(("^[cd\\*]" 0 (11))))
>
> Or copy the definition from fortran.el and change "71" in the second
> element to whatever value you want. It should be easier to customize
> this, sorry.
>
> Or use f90-mode rather than fortran-mode if you are actually writing
> free-form code.
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>
>
--
View this message in context: http://www.nabble.com/fortran-line-width---comment-tp11007454p18530859.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <mailman.15010.1216429221.18990.help-gnu-emacs@gnu.org>]
end of thread, other threads:[~2008-07-28 20:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-07 12:58 fortran line width & comment tunti
[not found] <mailman.1731.1181224869.32220.help-gnu-emacs@gnu.org>
2007-06-07 19:26 ` Glenn Morris
2007-06-12 14:10 ` Stefan Monnier
2007-06-12 19:32 ` Glenn Morris
2008-07-18 14:44 ` berniep
[not found] ` <mailman.15010.1216429221.18990.help-gnu-emacs@gnu.org>
2008-07-19 1:33 ` Glenn Morris
2008-07-28 20:32 ` berniep
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.