[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

U.12.5 Checking Columns in Fortran

C-c C-r
Display a "column ruler" momentarily above the current line (fortran-column-ruler).
C-c C-w
Split the current window horizontally temporarily so that it is 72 columns wide (fortran-window-create-momentarily). This may help you avoid making lines longer than the 72-character limit that some Fortran compilers impose.
C-u C-c C-w
Split the current window horizontally so that it is 72 columns wide (fortran-window-create). You can then continue editing.
M-x fortran-strip-sequence-nos
Delete all text in column 72 and beyond.

The command C-c C-r (fortran-column-ruler) shows a column ruler momentarily above the current line. The comment ruler is two lines of text that show you the locations of columns with special significance in Fortran programs. Square brackets show the limits of the columns for line numbers, and curly brackets show the limits of the columns for the statement body. Column numbers appear above them.

Note that the column numbers count from zero, as always in GNU Emacs. As a result, the numbers may be one less than those you are familiar with; but the positions they indicate in the line are standard for Fortran.

The text used to display the column ruler depends on the value of the variable indent-tabs-mode. If indent-tabs-mode is nil, then the value of the variable fortran-column-ruler-fixed is used as the column ruler. Otherwise, the variable fortran-column-ruler-tab is displayed. By changing these variables, you can change the column ruler display.

C-c C-w (fortran-window-create-momentarily) temporarily splits the current window horizontally, making a window 72 columns wide, so you can see which lines that is too long. Type a space to restore the normal width.

You can also split the window horizontally and continue editing with the split in place. To do this, use C-u C-c C-w (M-x fortran-window-create). By editing in this window you can immediately see when you make a line too wide to be correct Fortran.

The command M-x fortran-strip-sequence-nos deletes all text in column 72 and beyond, on all lines in the current buffer. This is the easiest way to get rid of old sequence numbers.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on April 2, 2002 using texi2html