GNU Emacs
Emacs
Dashboard

26.14.4 Auto Fill in Fortran Mode

Fortran mode has specialized support for Auto Fill mode, which is a minor mode that automatically splits statements as you insert them when they become too wide. Splitting a statement involves making continuation lines using fortran-continuation-string (see Continuation Lines). This splitting happens when you type SPC, RET, or TAB, and also in the Fortran indentation commands. You activate Auto Fill in Fortran mode in the normal way. See Auto Fill Mode.

Auto Fill breaks lines at spaces or delimiters when the lines get longer than the desired width (the value of fill-column). The delimiters (besides whitespace) that Auto Fill can 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.

To enable Auto Fill in all Fortran buffers, add auto-fill-mode to fortran-mode-hook. See Hooks.