[OS X Emacs] Fortran syntax highlighting in Aquamacs
Bill Sacks
wsacks at wisc.edu
Wed Feb 11 17:09:16 EST 2009
Thank you all for your responses.
From what I can tell, fortran-line-length does not appear to be
customizable in Aquamacs 1.6, which is based on GNU Emacs 22.3.2.
Perhaps this variable was added in a later version of emacs (such as
version 23.1, as suggested by Jochen's email)?
If I use f90-mode, as some people suggested, that fixes some problems
but creates others. For example, it causes comments and indentation
to be handled incorrectly.
I know that the best solution would just be to not work with Fortran
77 code at all ;-) Sadly, that's not a possibility right now.
Thanks,
Bill
On Feb 11, 2009, at 1:39 PM, Jochen Küpper wrote:
> On 11.02.2009, at 19:57, Nathaniel Cunningham wrote:
>
>>
>> On Wed, Feb 11, 2009 at 10:05 AM, Bill Sacks <wsacks at wisc.edu> wrote:
>>
>> Does anyone know how to change this behavior - for example, to
>> configure the Fortran syntax highlighting so that it can handle
>> 132-character lines rather than 72-character lines?
>
> fortran-line-length is a variable defined in `fortran.el'.
> Its value is 72
>
> Automatically becomes buffer-local when set in any fashion.
> This variable is safe as a file local variable if its value
> satisfies the predicate `integerp'.
>
> Documentation:
> Maximum number of characters in a line of fixed-form Fortran code.
> Characters beyond this point are treated as comments. Setting
> this variable directly (after fortran mode is loaded) does not
> take effect. Use either M-x customize (which affects all Fortran
> buffers and the default) or the function
> `fortran-line-length' (which can also operate on just the current
> buffer). This corresponds to the g77 compiler option
> `-ffixed-line-length-N'.
>
> You can customize this variable.
>
> This variable was introduced, or its default value was changed, in
> version 23.1 of Emacs.
>
>
>>
>>
>>
>> From taking a look at the fortran.el, this line length doesn't
>> appear to be customizable.
>>
>> The docstring for fortran-mode does say:
>> "Major mode for editing Fortran code in fixed format.
>> For free format code, use `f90-mode'."
>>
>> ... so you could see if f90-mode gives you the highlighting you
>> want while still working OK otherwise with f77 code.
>>
>> --Nathaniel
>> _____________________________________________________________
>> MacOSX-Emacs mailing list
>> MacOSX-Emacs at email.esm.psu.edu
>> http://email.esm.psu.edu/mailman/listinfo/macosx-emacs
>> List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx
>
> Schöne Grüße,
> Jochen
> --
> Einigkeit und Recht und Freiheit http://www.Jochen-
> Kuepper.de
> Liberté, Égalité, Fraternité GnuPG key: CC1B0B4D
> Sex, drugs and rock-n-roll
>
>
> _____________________________________________________________
> MacOSX-Emacs mailing list
> MacOSX-Emacs at email.esm.psu.edu
> http://email.esm.psu.edu/mailman/listinfo/macosx-emacs
> List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx
More information about the MacOSX-Emacs
mailing list