unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Column Numbers in emacs in F90 Environment?
@ 2006-11-16  3:49 qquito
  2006-11-16  7:17 ` Glenn Morris
  0 siblings, 1 reply; 2+ messages in thread
From: qquito @ 2006-11-16  3:49 UTC (permalink / raw)


Hello, Everyone:

I use emacs to do most of my editing work.

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?

Thanks for reading and replying.

--Roland

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Column Numbers in emacs in F90 Environment?
  2006-11-16  3:49 Column Numbers in emacs in F90 Environment? qquito
@ 2006-11-16  7:17 ` Glenn Morris
  0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2006-11-16  7:17 UTC (permalink / raw)


"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
form).

If so, you can:

1) put

C -*- fortran -*-

as the first line of the files to get Emacs to open them in
fortran-mode.

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)))

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-11-16  7:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-16  3:49 Column Numbers in emacs in F90 Environment? qquito
2006-11-16  7:17 ` Glenn Morris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).