365 |
The basic indentation command is @key{TAB}, which gives the current line |
The basic indentation command is @key{TAB}, which gives the current line |
366 |
the correct indentation as determined from the previous lines. The |
the correct indentation as determined from the previous lines. The |
367 |
function that @key{TAB} runs depends on the major mode; it is |
function that @key{TAB} runs depends on the major mode; it is |
368 |
@code{indent-for-tab-command} |
@code{lisp-indent-line} |
369 |
in Lisp mode, @code{c-indent-command} in C mode, etc. These functions |
in Lisp mode, @code{c-indent-command} in C mode, etc. These functions |
370 |
understand the syntax and conventions of different languages, but they all do |
understand the syntax and conventions of different languages, but they all do |
371 |
conceptually the same job: @key{TAB} in any programming-language major mode |
conceptually the same job: @key{TAB} in any programming-language major mode |
411 |
|
|
412 |
@table @kbd |
@table @kbd |
413 |
@item C-M-q |
@item C-M-q |
414 |
Reindent all the lines within one parenthetical grouping(@code{indent-sexp}). |
Reindent all the lines within one parenthetical grouping(@code{indent-sexp}) . |
415 |
@item C-M-\ |
@item C-M-\ |
416 |
Reindent all lines in the region (@code{indent-region}). |
Reindent all lines in the region (@code{indent-region}). |
417 |
@item C-u @key{TAB} |
@item C-u @key{TAB} |
426 |
@findex indent-sexp |
@findex indent-sexp |
427 |
You can reindent the contents of a single parenthetical grouping by |
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} |
positioning point before the beginning of it and typing @kbd{C-M-q} |
429 |
(@code{indent-sexp} in Lisp mode, @code{c-indent-exp} in C mode; also |
(@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 |
bound to other suitable commands in other modes). The indentation of |
431 |
the line where the grouping starts is not changed; therefore it |
the line where the grouping starts is not changed; therefore it |
432 |
changes only the relative indentation within the grouping, not its |
changes only the relative indentation within the grouping, not its |
455 |
region sideways, like @code{indent-rigidly} does (@pxref{Indentation |
region sideways, like @code{indent-rigidly} does (@pxref{Indentation |
456 |
Commands}). It doesn't alter the indentation of lines that start |
Commands}). It doesn't alter the indentation of lines that start |
457 |
inside a string, unless the region also starts inside that string. |
inside a string, unless the region also starts inside that string. |
458 |
|
The prefix arg specifies the number of columns to indent. |
459 |
|
|
460 |
@node Lisp Indent |
@node Lisp Indent |
461 |
@subsection Customizing Lisp Indentation |
@subsection Customizing Lisp Indentation |
798 |
@vindex blink-matching-paren |
@vindex blink-matching-paren |
799 |
@vindex blink-matching-paren-distance |
@vindex blink-matching-paren-distance |
800 |
@vindex blink-matching-delay |
@vindex blink-matching-delay |
801 |
Three variables control parenthesis match display. |
Three variables control parenthesis match display: |
802 |
@code{blink-matching-paren} turns the feature on or off: @code{nil} |
|
803 |
|
@code{blink-matching-paren} turns the feature on or off: @code{nil} |
804 |
disables it, but the default is @code{t} to enable match display. |
disables it, but the default is @code{t} to enable match display. |
805 |
|
|
806 |
@code{blink-matching-delay} says how many seconds to leave the |
@code{blink-matching-delay} says how many seconds to leave the |
1222 |
mode constantly displays in the echo area the argument list for the |
mode constantly displays in the echo area the argument list for the |
1223 |
function being called at point. (In other words, it finds the |
function being called at point. (In other words, it finds the |
1224 |
function call that point is contained in, and displays the argument |
function call that point is contained in, and displays the argument |
1225 |
list of that function.) Eldoc mode applies in Emacs Lisp and Lisp |
list of that function.) If point is over a documented variable, it |
1226 |
Interaction modes only. Use the command @kbd{M-x eldoc-mode} to |
shows the variable's docstring. Eldoc mode applies in Emacs Lisp and |
1227 |
|
Lisp Interaction modes only. Use the command @kbd{M-x eldoc-mode} to |
1228 |
enable or disable this feature. |
enable or disable this feature. |
1229 |
|
|
1230 |
@node Hideshow |
@node Hideshow |
1738 |
@findex c-show-syntactic-information |
@findex c-show-syntactic-information |
1739 |
@kindex C-c C-s @r{(C mode)} |
@kindex C-c C-s @r{(C mode)} |
1740 |
Display the syntactic information about the current source line |
Display the syntactic information about the current source line |
1741 |
(@code{c-show-syntactic-information}). This is the information that |
(@code{c-show-syntactic-information}). This information directs how |
1742 |
directs how the line is indented. |
the line is indented. |
1743 |
|
|
1744 |
@item M-x cwarn-mode |
@item M-x cwarn-mode |
1745 |
@itemx M-x global-cwarn-mode |
@itemx M-x global-cwarn-mode |
2066 |
|
|
2067 |
@table @kbd |
@table @kbd |
2068 |
@item M-; |
@item M-; |
2069 |
Align comment or insert new comment (@code{fortran-comment-indent}). |
Align comment or insert new comment (@code{fortran-indent-comment}). |
2070 |
|
|
2071 |
@item C-x ; |
@item C-x ; |
2072 |
Applies to nonstandard @samp{!} comments only. |
Applies to nonstandard @samp{!} comments only. |
2077 |
@end table |
@end table |
2078 |
|
|
2079 |
@kbd{M-;} in Fortran mode is redefined as the command |
@kbd{M-;} in Fortran mode is redefined as the command |
2080 |
@code{fortran-comment-indent}. Like the usual @kbd{M-;} command, this |
@code{fortran-indent-comment}. Like the usual @kbd{M-;} command, this |
2081 |
recognizes any kind of existing comment and aligns its text appropriately; |
recognizes any kind of existing comment and aligns its text appropriately; |
2082 |
if there is no existing comment, a comment is inserted and aligned. But |
if there is no existing comment, a comment is inserted and aligned. But |
2083 |
inserting and aligning comments are not the same in Fortran mode as in |
inserting and aligning comments are not the same in Fortran mode as in |