X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/2aa2f8b8c979787390f8ebf6ebe22fa81bbe7c06..2b02353b7bfdf86d0c333b00896d7752a9f408e9:/man/indent.texi diff --git a/man/indent.texi b/man/indent.texi index ab640e7646..319244bfac 100644 --- a/man/indent.texi +++ b/man/indent.texi @@ -1,5 +1,6 @@ @c This is part of the Emacs manual. -@c Copyright (C) 1985, 86, 87, 93, 94, 95, 1997, 2004 Free Software Foundation, Inc. +@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2002, 2003, +@c 2004, 2005, 2006 Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Indentation, Text, Major Modes, Top @chapter Indentation @@ -16,7 +17,7 @@ Indent the current line ``appropriately'' in a mode-dependent fashion. Perform @key{RET} followed by @key{TAB} (@code{newline-and-indent}). @item M-^ Merge the previous and the current line (@code{delete-indentation}). -This would cancel out the effect of @kbd{C-j}. +This would cancel the effect of a preceding @kbd{C-j}. @item C-M-o Split the current line at point; text on the line after point becomes a new line indented to the same column where point is located @@ -25,9 +26,9 @@ new line indented to the same column where point is located Move (forward or back) to the first nonblank character on the current line (@code{back-to-indentation}). @item C-M-\ -Indent several lines to the same column (@code{indent-region}). +Indent lines in the region to the same column (@code{indent-region}). @item C-x @key{TAB} -Shift a block of lines rigidly right or left (@code{indent-rigidly}). +Shift lines in the region rigidly right or left (@code{indent-rigidly}). @item M-i Indent from point to the next prespecified tab stop column (@code{tab-to-tab-stop}). @@ -44,14 +45,14 @@ Insert a tab character. You can type @kbd{C-q @key{TAB}} to do this. A tab character is displayed as a stretch of whitespace which extends to the next display tab stop position, and the default width of a tab -stop is eight. @xref{Display Custom}, for more details. +stop is eight. @xref{Text Display}, for more details. @item -Advance to the next tab stop. You can set tab stops at your choice of -column positions, then type @kbd{M-i} to advance to the next tab stop. -The default is to have tab stops every eight columns, which means by -default @kbd{M-i} inserts a tab character. To set the tab stops, use -@kbd{M-x edit-tab-stops}. +Insert whitespace up to the next tab stop. You can set tab stops at +your choice of column positions, then type @kbd{M-i} to advance to the +next tab stop. The default tab stop settings have a tab stop every +eight columns, which means by default @kbd{M-i} inserts a tab +character. To set the tab stops, use @kbd{M-x edit-tab-stops}. @item Align a line with the previous line. More precisely, the command @@ -72,15 +73,11 @@ of the preceding lines. No matter where in the line you are when you type @key{TAB}, it aligns the line as a whole. @end enumerate - Normally, all of the above methods insert an optimal mix of tabs and + Normally, most of the above methods insert an optimal mix of tabs and spaces to align to the desired column. @xref{Just Spaces}, for how to disable use of tabs. However, @kbd{C-q @key{TAB}} always inserts a tab, even when tabs are disabled for the indentation commands. -@c In Text mode, @key{TAB} runs the command @code{tab-to-tab-stop}, which -@c indents to the next tab stop column. You can set the tab stops with -@c @kbd{M-x edit-tab-stops}. - @menu * Indentation Commands:: Various commands and techniques for indentation. * Tab Stops:: You can set arbitrary "tab stops" and then @@ -117,13 +114,13 @@ regard, @kbd{C-M-o} resembles @kbd{C-o}. @kindex M-^ @findex delete-indentation To join two lines cleanly, use the @kbd{M-^} -(@code{delete-indentation}) command. It deletes the indentation at the -front of the current line, and the line boundary as well, replacing them -with a single space. As a special case (useful for Lisp code) the -single space is omitted if the characters to be joined are consecutive -open parentheses or closing parentheses, or if the junction follows -another newline. To delete just the indentation of a line, go to the -beginning of the line and use @kbd{M-\} +(@code{delete-indentation}) command. It deletes the indentation at +the front of the current line, and the line boundary as well, +replacing them with a single space. As a special case (useful for +Lisp code) the single space is omitted if the characters to be joined +are consecutive open parentheses or closing parentheses, or if the +junction follows another newline. To delete just the indentation of a +line, go to the beginning of the line and use @kbd{M-\} (@code{delete-horizontal-space}), which deletes all spaces and tabs around the cursor. @@ -143,12 +140,12 @@ shifted left or right so that its first nonblank character appears in that column. @kbd{C-x @key{TAB}} (@code{indent-rigidly}) moves all of the lines in the region right by its argument (left, for negative arguments). The whole group of lines moves rigidly sideways, which is -how the command gets its name.@refill +how the command gets its name. @cindex remove indentation - If you want to remove all indentation from all of the line in the -region, invoke @kbd{C-x @key{TAB}} with a large negative argument, -such as -1000. + To remove all indentation from all of the lines in the region, +invoke @kbd{C-x @key{TAB}} with a large negative argument, such as +-1000. @findex indent-relative @kbd{M-x indent-relative} indents at point based on the previous line