Mercurial > emacs
comparison man/programs.texi @ 59475:279e43932b6f
(Multi-line Indent): Fix previous change.
(Fortran Autofill): Simplify description of fortran-auto-fill-mode.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 11 Jan 2005 22:41:57 +0000 |
parents | 26a204697252 |
children | 0816b427495a cb67264d6096 |
comparison
equal
deleted
inserted
replaced
59474:9a23ea95fbf6 | 59475:279e43932b6f |
---|---|
315 @findex which-function-mode | 315 @findex which-function-mode |
316 @vindex which-func-modes | 316 @vindex which-func-modes |
317 To enable (or disable) Which Function mode, use the command @kbd{M-x | 317 To enable (or disable) Which Function mode, use the command @kbd{M-x |
318 which-function-mode}. This command is global; it applies to all | 318 which-function-mode}. This command is global; it applies to all |
319 buffers, both existing ones and those yet to be created. However, it | 319 buffers, both existing ones and those yet to be created. However, it |
320 takes effect in only certain major modes, those listed in the value of | 320 takes effect only in certain major modes, those listed in the value of |
321 @code{which-func-modes}. If the value is @code{t}, then Which Function | 321 @code{which-func-modes}. If the value is @code{t}, then Which Function |
322 mode applies to all major modes that know how to support it---in other | 322 mode applies to all major modes that know how to support it---in other |
323 words, all the major modes that support Imenu. | 323 words, all the major modes that support Imenu. |
324 | 324 |
325 @node Program Indent | 325 @node Program Indent |
409 altered or moved to a different level in the parenthesis structure, | 409 altered or moved to a different level in the parenthesis structure, |
410 you have several commands available. | 410 you have several commands available. |
411 | 411 |
412 @table @kbd | 412 @table @kbd |
413 @item C-M-q | 413 @item C-M-q |
414 Reindent all the lines within one parenthetical grouping(@code{indent-sexp}) . | 414 Reindent all the lines within one parenthetical grouping (@code{indent-pp-sexp}). |
415 @item C-M-\ | 415 @item C-M-\ |
416 Reindent all lines in the region (@code{indent-region}). | 416 Reindent all lines in the region (@code{indent-region}). |
417 @item C-u @key{TAB} | 417 @item C-u @key{TAB} |
418 Shift an entire parenthetical grouping rigidly sideways so that its | 418 Shift an entire parenthetical grouping rigidly sideways so that its |
419 first line is properly indented. | 419 first line is properly indented. |
421 Shift all the lines in the region rigidly sideways, but do not alter | 421 Shift all the lines in the region rigidly sideways, but do not alter |
422 lines that start inside comments and strings. | 422 lines that start inside comments and strings. |
423 @end table | 423 @end table |
424 | 424 |
425 @kindex C-M-q | 425 @kindex C-M-q |
426 @findex indent-sexp | 426 @findex indent-pp-sexp |
427 You can reindent the contents of a single parenthetical grouping by | 427 You can reindent the contents of a single parenthetical grouping by |
428 positioning point before the beginning of it and typing @kbd{C-M-q} | 428 positioning point before the beginning of it and typing @kbd{C-M-q} |
429 (@code{indent-pp-sexp} in Lisp mode, @code{c-indent-exp} in C mode; also | 429 (@code{indent-pp-sexp} in Lisp mode, @code{c-indent-exp} in C mode; also |
430 bound to other suitable commands in other modes). The indentation of | 430 bound to other suitable commands in other modes). The indentation of |
431 the line where the grouping starts is not changed; therefore it | 431 the line where the grouping starts is not changed; therefore this |
432 changes only the relative indentation within the grouping, not its | 432 changes only the relative indentation within the grouping, not its |
433 overall indentation. To correct that as well, type @key{TAB} first. | 433 overall indentation. To correct that as well, type @key{TAB} first. |
434 | 434 |
435 Another way to specify the range to be reindented is with the | 435 Another way to specify the range to be reindented is with the |
436 region. The command @kbd{C-M-\} (@code{indent-region}) applies | 436 region. The command @kbd{C-M-\} (@code{indent-region}) applies |
2165 @code{fortran-continuation-string} (@pxref{ForIndent Cont}). This | 2165 @code{fortran-continuation-string} (@pxref{ForIndent Cont}). This |
2166 splitting happens when you type @key{SPC}, @key{RET}, or @key{TAB}, and | 2166 splitting happens when you type @key{SPC}, @key{RET}, or @key{TAB}, and |
2167 also in the Fortran indentation commands. | 2167 also in the Fortran indentation commands. |
2168 | 2168 |
2169 @findex fortran-auto-fill-mode | 2169 @findex fortran-auto-fill-mode |
2170 @kbd{M-x fortran-auto-fill-mode} turns Fortran Auto Fill mode on if it | 2170 @kbd{M-x fortran-auto-fill-mode} toggles Fortran Auto Fill mode, |
2171 was off, or off if it was on. This command works the same as @kbd{M-x | 2171 which is a variant of normal Auto Fill mode (@pxref{Filling}) designed |
2172 auto-fill-mode} does for normal Auto Fill mode (@pxref{Filling}). A | 2172 for Fortran programs. Fortran Auto Fill mode is a buffer-local minor |
2173 positive numeric argument turns Fortran Auto Fill mode on, and a | 2173 mode (@pxref{Minor Modes}). When Fortran Auto Fill mode is in effect, |
2174 negative argument turns it off. You can see when Fortran Auto Fill mode | 2174 the word @samp{Fill} appears in the mode line inside the parentheses. |
2175 is in effect by the presence of the word @samp{Fill} in the mode line, | |
2176 inside the parentheses. Fortran Auto Fill mode is a minor mode, turned | |
2177 on or off for each buffer individually. @xref{Minor Modes}. | |
2178 | 2175 |
2179 @vindex fortran-break-before-delimiters | 2176 @vindex fortran-break-before-delimiters |
2180 Fortran Auto Fill mode breaks lines at spaces or delimiters when the | 2177 Fortran Auto Fill mode breaks lines at spaces or delimiters when the |
2181 lines get longer than the desired width (the value of @code{fill-column}). | 2178 lines get longer than the desired width (the value of @code{fill-column}). |
2182 The delimiters that Fortran Auto Fill mode may break at are @samp{,}, | 2179 The delimiters that Fortran Auto Fill mode may break at are @samp{,}, |
2183 @samp{'}, @samp{+}, @samp{-}, @samp{/}, @samp{*}, @samp{=}, and @samp{)}. | 2180 @samp{'}, @samp{+}, @samp{-}, @samp{/}, @samp{*}, @samp{=}, and @samp{)}. |
2184 The line break comes after the delimiter if the variable | 2181 The line break comes after the delimiter if the variable |
2185 @code{fortran-break-before-delimiters} is @code{nil}. Otherwise (and by | 2182 @code{fortran-break-before-delimiters} is @code{nil}. Otherwise (and by |
2186 default), the break comes before the delimiter. | 2183 default), the break comes before the delimiter. |
2187 | 2184 |
2188 By default, Fortran Auto Fill mode is not enabled. If you want this | 2185 To enable this mode permanently, add a hook function to |
2189 feature turned on permanently, add a hook function to | |
2190 @code{fortran-mode-hook} to execute @code{(fortran-auto-fill-mode 1)}. | 2186 @code{fortran-mode-hook} to execute @code{(fortran-auto-fill-mode 1)}. |
2191 @xref{Hooks}. | 2187 @xref{Hooks}. |
2192 | 2188 |
2193 @node Fortran Columns | 2189 @node Fortran Columns |
2194 @subsection Checking Columns in Fortran | 2190 @subsection Checking Columns in Fortran |