+2010-03-21 Chong Yidong <cyd@stupidchicken.com>
+
+ * search.texi (Other Repeating Search): Document multi-isearch-buffers
+ and multi-isearch-buffers-regexp.
+
+ * indent.texi (Indentation): Clarify description of
+ indent-for-tab-command. Document tab-always-indent.
+
2010-03-20 Chong Yidong <cyd@stupidchicken.com>
* cmdargs.texi (Font X): Move most content to Fonts.
Indent from point to under an indentation point in the previous line.
@end table
- In most major modes, the @key{TAB} key runs the command
-@code{indent-for-tab-command}, which either performs indentation or
-inserts whitespace at point, depending on the situation.
-
- In programming modes such as Lisp mode and C mode, @key{TAB} indents
-the current line if the region is inactive. If the region is active,
-it indents every line in the region (@pxref{Mark}). Indentation means
-adding or removing some combination of space and tab characters
-(@dfn{whitespace characters}) at the start of the line, in a way that
-makes sense given the text in the preceding lines. Exactly how
-indentation is performed depends on the major mode. @xref{Program
-Indent}.
-
- In text modes, @key{TAB} inserts some whitespace characters to
-advance point to the next tab stop (@pxref{Tab Stops}). For the
-purposes of this command, the position of the first non-whitespace
-character on the preceding line is treated as an additional tab stop.
-You can therefore use @key{TAB} to ``align'' point with the preceding
-line. If the region is active, @key{TAB} performs this action on
-every line in the region.
+@noindent
+The @key{TAB} key runs @code{indent-for-tab-command} in most major
+modes (in C and related modes, @key{TAB} runs a separate command,
+@code{c-indent-line-or-region}, which behaves similarly). The major
+mode determines just what this entails.
+
+ In text modes, @key{TAB} inserts some combination of space and tab
+characters to advance point to the next tab stop (@pxref{Tab Stops}).
+If the region is active and spans multiple lines, it advances the
+first character of each of those lines to the next tab stop
+(@pxref{Using Region}). For the purposes of this command, the
+position of the first non-whitespace character on the preceding line
+is treated as an additional tab stop. Thus, you can use @key{TAB} to
+``align'' point with the preceding line.
+
+ In programming modes, @key{TAB} adds or removes some combination of
+space and tab characters at the start of the line, in a way that makes
+sense given the text in the preceding lines. If the region is active
+and spans multiple lines, all those lines are indented this way. If
+point was initially within the current line's indentation, it is
+positioned after that indentation; otherwise, it remains at same point
+in the newly-indented text. @xref{Program Indent}.
@vindex tab-width
- Indentation is often performed with the help of @dfn{tab characters}
-(@acronym{ASCII} code 9), which are displayed as a stretch of empty space
-extending to the next @dfn{display tab stop}. By default, there is
-one display tab stop every eight columns; the number of columns is
-determined by the variable @code{tab-width}. You can insert a single
-tab character by typing @kbd{C-q @key{TAB}}. @xref{Text Display}.
+ Normally, indentation commands insert (or remove) an optimal mix of
+@dfn{tab characters} and spaces to align to the desired column. Tab
+characters (@acronym{ASCII} code 9) are displayed as a stretch of
+empty space extending to the next @dfn{display tab stop}. By default,
+there is one display tab stop every eight columns; the number of
+columns is determined by the variable @code{tab-width}. You can
+insert a single tab character by typing @kbd{C-q @key{TAB}}.
+@xref{Text Display}.
@findex edit-tab-stops
@findex tab-to-tab-stop
to advance point up to the next tab stop. By default, this involves
deleting the existing whitespace and inserting a single tab character.
- Normally, most of these indentation commands 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.
+ @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.
+
+@vindex tab-always-indent
+ The variable @code{tab-always-indent} tweaks the behavior of the
+@key{TAB} (@code{indent-for-tab-command}) command. The default value,
+@code{t}, gives the behavior described above. If you change the value
+to the symbol @code{complete}, then @key{TAB} first tries to indent
+the current line, and if the line was already indented, it tries to
+complete the text at point (@pxref{Symbol Completion}). If the value
+is @code{nil}, then @key{TAB} indents the current line only if point
+is at the left margin or in the line's indentation; otherwise, it
+inserts a real tab character.
@menu
* Indentation Commands:: Various commands and techniques for indentation.
@findex keep-lines
@table @kbd
-@item M-x occur @key{RET} @var{regexp} @key{RET}
-Display a list showing each line in the buffer that contains a match
-for @var{regexp}. To limit the search to part of the buffer, narrow
-to that part (@pxref{Narrowing}). A numeric argument @var{n}
-specifies that @var{n} lines of context are to be displayed before and
-after each matching line. Currently, @code{occur} can not correctly
-handle multiline matches.
+@item M-x multi-isearch-buffers
+Prompt for one or more buffer names, ending with @key{RET}; then,
+begin a multi-buffer incremental search in those buffers. (If the
+search fails in one buffer, the next @kbd{C-s} tries searching the
+next specified buffer, and so forth.) With a prefix argument, prompt
+for a regexp and begin a multi-buffer incremental search in buffers
+matching that regexp.
+
+@item M-x multi-isearch-buffers-regexp
+This command is just like @code{multi-isearch-buffers}, except it
+performs an incremental regexp search.
+
+@item M-x occur
+Prompt for a regexp, and display a list showing each line in the
+buffer that contains a match for it. To limit the search to part of
+the buffer, narrow to that part (@pxref{Narrowing}). A numeric
+argument @var{n} specifies that @var{n} lines of context are to be
+displayed before and after each matching line. Currently,
+@code{occur} can not correctly handle multiline matches.
@kindex RET @r{(Occur mode)}
@kindex o @r{(Occur mode)}
@item M-x list-matching-lines
Synonym for @kbd{M-x occur}.
-@item M-x multi-occur @key{RET} @var{buffers} @key{RET} @var{regexp} @key{RET}
-This function is just like @code{occur}, except it is able to search
-through multiple buffers. It asks you to specify the buffer names one by one.
-
-@item M-x multi-occur-in-matching-buffers @key{RET} @var{bufregexp} @key{RET} @var{regexp} @key{RET}
-This function is similar to @code{multi-occur}, except the buffers to
-search are specified by a regular expression that matches visited
-file names. With a prefix argument, it uses the regular expression to match
-buffer names instead.
-
-@item M-x how-many @key{RET} @var{regexp} @key{RET}
-Print the number of matches for @var{regexp} that exist in the buffer
-after point. If the region is active, this operates on the region
-instead.
-
-@item M-x flush-lines @key{RET} @var{regexp} @key{RET}
-This command deletes each line that contains a match for @var{regexp},
-operating on the text after point; it deletes the current line if it
-contains a match starting after point. If the region is active, it
-operates on the region instead; if a line partially contained in the
-region contains a match entirely contained in the region, it is
-deleted.
+@item M-x multi-occur
+This command is just like @code{occur}, except it is able to search
+through multiple buffers. It asks you to specify the buffer names one
+by one.
+
+@item M-x multi-occur-in-matching-buffers
+This command is similar to @code{multi-occur}, except the buffers to
+search are specified by a regular expression that matches visited file
+names. With a prefix argument, it uses the regular expression to
+match buffer names instead.
+
+@item M-x how-many
+Prompt for a regexp, and print the number of matches for it in the
+buffer after point. If the region is active, this operates on the
+region instead.
+
+@item M-x flush-lines
+Prompt for a regexp, and delete each line that contains a match for
+it, operating on the text after point. This command deletes the
+current line if it contains a match starting after point. If the
+region is active, it operates on the region instead; if a line
+partially contained in the region contains a match entirely contained
+in the region, it is deleted.
If a match is split across lines, @code{flush-lines} deletes all those
lines. It deletes the lines before starting to look for the next
match; hence, it ignores a match starting on the same line at which
another match ended.
-@item M-x keep-lines @key{RET} @var{regexp} @key{RET}
-This command deletes each line that @emph{does not} contain a match
-for @var{regexp}, operating on the text after point; if point is not
-at the beginning of a line, it always keeps the current line. If the
-region is active, the command operates on the region instead; it never
-deletes lines that are only partially contained in the region (a
-newline that ends a line counts as part of that line).
+@item M-x keep-lines
+Prompt for a regexp, and delete each line that @emph{does not} contain
+a match for it, operating on the text after point. If point is not at
+the beginning of a line, this command always keeps the current line.
+If the region is active, the command operates on the region instead;
+it never deletes lines that are only partially contained in the region
+(a newline that ends a line counts as part of that line).
If a match is split across lines, this command keeps all those lines.
@end table
** Completion changes
*** The new command `completion-at-point' provides mode-sensitive completion.
-
++++
*** tab-always-indent set to `complete' lets TAB do completion as well.
+++
*** The new completion-style `initials' is available.
`comint-history-isearch' is non-nil. New commands `comint-history-isearch-backward'
and `comint-history-isearch-backward-regexp' (bound to M-r) start Isearch
in the input history regardless of the value of `comint-history-isearch'.
-
++++
*** Interactively `multi-isearch-buffers' and `multi-isearch-buffers-regexp'
read buffer names to search, one by one, ended with RET. With a prefix
argument, they ask for a regexp, and search in buffers whose names match