[Top][All Lists]

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

Re: Column Numbers in emacs in F90 Environment?

From: Glenn Morris
Subject: Re: Column Numbers in emacs in F90 Environment?
Date: Wed, 15 Nov 2006 23:17:42 -0800
User-agent: Gnus (, GNU Emacs (

"qquito" wrote:

> When I edit Fortran 77 codes in emacs, I can use the command
> Control-C and Control-R sequentially to display a ruler temporarily
> showing column numbers. But this command does not work when I edit
> Fortran 90 codes. Is there a similar command in Fortran 90
> environment?

If column numbers matter to you, it sounds like the files you are
editing are fixed-form, rather than free-form. In which case, you want
to edit them in fortran-mode rather than f90-mode, even if they are
Fortran 90 files. A bit confusing, but the confusion is Fortran's (eg
most compilers interpret .f90 files to be free-form and .f to be fixed

If so, you can:

1) put

C -*- fortran -*-

as the first line of the files to get Emacs to open them in

2) change the mode Emacs uses for .f90 files:

(add-to-list 'auto-mode-alist '("\\.f90\\'" . fortran-mode))

If you really do just want the ruler for some reason:

(autoload 'fortran-column-ruler "fortran" nil t)
(add-hook 'f90-mode-hook (lambda ()
    (local-set-key "\C-c\C-r" 'fortran-column-ruler)))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]