summaryrefslogtreecommitdiff
path: root/doc/emacs/indent.texi
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2013-12-21 16:37:08 +0800
committerChong Yidong <cyd@gnu.org>2013-12-21 16:37:08 +0800
commit77221051a20d22ab785b0e0441a320862ec589a0 (patch)
treeb164afe2463da7bfbc0818ce875b2dc8618f99c3 /doc/emacs/indent.texi
parent70c8f5ca14b1de558e6f01dc745822fb957a11d1 (diff)
downloademacs-77221051a20d22ab785b0e0441a320862ec589a0.tar.gz
Tweak C-x TAB behavior changes, and update docs.
* lisp/indent.el (indent-rigidly-map): Add docstring, and move commands into named functions. (indent-rigidly-left, indent-rigidly-right) (indent-rigidly-left-to-tab-stop) (indent-rigidly-right-to-tab-stop): New functions. Decide on indentation direction based on bidi direction, and accumulate sequential commands in a single undo boundary. (indent-rigidly--pop-undo): New utility function. * doc/emacs/indent.texi (Indentation Commands): Document C-x TAB changes. * doc/lispref/text.texi (Region Indent): Note the new interactive behavior of indent-rigidly.
Diffstat (limited to 'doc/emacs/indent.texi')
-rw-r--r--doc/emacs/indent.texi28
1 files changed, 20 insertions, 8 deletions
diff --git a/doc/emacs/indent.texi b/doc/emacs/indent.texi
index 43294866b7b..0e35a63aa98 100644
--- a/doc/emacs/indent.texi
+++ b/doc/emacs/indent.texi
@@ -127,14 +127,26 @@ that column number.
@kindex C-x TAB
@findex indent-rigidly
@cindex remove indentation
-Shift each line in the region by a fixed distance, to the right or
-left (@code{indent-rigidly}). The distance to move is determined by
-the numeric argument (positive to move rightward, negative to move
-leftward).
-
-This command can be used to remove all indentation from the lines in
-the region, by invoking it with a large negative argument,
-e.g., @kbd{C-u -1000 C-x @key{TAB}}.
+This command is used to change the indentation of all lines that begin
+in the region, moving the affected lines as a ``rigid'' unit.
+
+If called with no argument, the command activates a transient mode for
+adjusting the indentation of the affected lines interactively. While
+this transient mode is active, typing @key{LEFT} or @key{RIGHT}
+indents leftward and rightward, respectively, by one space. You can
+also type @kbd{S-@key{LEFT}} or @kbd{S-@key{RIGHT}} to indent leftward
+or rightward to the next tab stop (@pxref{Tab Stops}). Typing any
+other key disables the transient mode, and resumes normal editing.
+
+If called with a prefix argument @var{n}, this command indents the
+lines forward by @var{n} spaces (without enabling the transient mode).
+Negative values of @var{n} indent backward, so you can remove all
+indentation from the lines in the region using a large negative
+argument, like this:
+
+@smallexample
+C-u -999 C-x @key{TAB}
+@end smallexample
@end table
@node Tab Stops