[OS X Emacs] Fortran syntax highlighting in Aquamacs

Jochen Küpper kuepper.jochen at googlemail.com
Wed Feb 11 14:39:32 EST 2009


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





More information about the MacOSX-Emacs mailing list