GNU Emacs Manual. Node: Fortran Autofill

PREVFortran Comments UPFortran NEXTFortran Columns

20.16.4: Fortran Auto Fill Mode

Fortran Auto Fill mode is a minor mode which automatically splits Fortran statements as you insert them when they become too wide. Splitting a statement involves making continuation lines using fortran-continuation-string (see ForIndent Cont). This splitting happens when you type SPC, RET, or TAB, and also in the Fortran indentation commands.

M-x fortran-auto-fill-mode turns Fortran Auto Fill mode on if it was off, or off if it was on. This command works the same as M-x auto-fill-mode does for normal Auto Fill mode (see Filling). A positive numeric argument turns Fortran Auto Fill mode on, and a negative argument turns it off. You can see when Fortran Auto Fill mode is in effect by the presence of the word `Fill' in the mode line, inside the parentheses. Fortran Auto Fill mode is a minor mode, turned on or off for each buffer individually. See Minor Modes.

Fortran Auto Fill mode breaks lines at spaces or delimiters when the lines get longer than the desired width (the value of fill-column). The delimiters that Fortran Auto Fill mode may break at are `,', `'', `+', `-', `/', `*', `=', and `)'. The line break comes after the delimiter if the variable fortran-break-before-delimiters is nil. Otherwise (and by default), the break comes before the delimiter.

By default, Fortran Auto Fill mode is not enabled. If you want this feature turned on permanently, add a hook function to fortran-mode-hook to execute (fortran-auto-fill-mode 1). See Hooks.

PREVFortran Comments UPFortran NEXTFortran Columns