aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2007-10-06 22:23:41 +0000
committerJuri Linkov2007-10-06 22:23:41 +0000
commita850cafb704a44871880711fc3eb687c47c4cd76 (patch)
treebfce66ef11e0fb7573fb5c07a0e455d62b3756b5
parent3220ac7f5e6bde4e38c5eb8a91c6366b1abbd86e (diff)
downloademacs-a850cafb704a44871880711fc3eb687c47c4cd76.tar.gz
emacs-a850cafb704a44871880711fc3eb687c47c4cd76.zip
(Fill Commands): Document fill-paragraph-or-region.
(Fill Prefix, Format Indentation): Replace fill-paragraph with fill-paragraph-or-region.
-rw-r--r--doc/emacs/text.texi43
1 files changed, 25 insertions, 18 deletions
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi
index 3a0e091ea40..9cfd4ffe922 100644
--- a/doc/emacs/text.texi
+++ b/doc/emacs/text.texi
@@ -486,9 +486,11 @@ The section on init files says how to arrange this permanently for yourself.
486 486
487@table @kbd 487@table @kbd
488@item M-q 488@item M-q
489Fill current paragraph (@code{fill-paragraph}). 489Fill current paragraph or active region (@code{fill-paragraph-or-region}).
490@item C-x f 490@item C-x f
491Set the fill column (@code{set-fill-column}). 491Set the fill column (@code{set-fill-column}).
492@item M-x fill-paragraph
493Fill current paragraph (@code{fill-paragraph}).
492@item M-x fill-region 494@item M-x fill-region
493Fill each paragraph in the region (@code{fill-region}). 495Fill each paragraph in the region (@code{fill-region}).
494@item M-x fill-region-as-paragraph 496@item M-x fill-region-as-paragraph
@@ -497,34 +499,39 @@ Fill the region, considering it as one paragraph.
497Center a line. 499Center a line.
498@end table 500@end table
499 501
500@kindex M-q
501@findex fill-paragraph 502@findex fill-paragraph
502 To refill a paragraph, use the command @kbd{M-q} 503 To refill a paragraph, use @kbd{M-x fill-paragraph}. This operates
503(@code{fill-paragraph}). This operates on the paragraph that point is 504on the paragraph that point is inside, or the one after point if point
504inside, or the one after point if point is between paragraphs. 505is between paragraphs. Refilling works by removing all the
505Refilling works by removing all the line-breaks, then inserting new ones 506line-breaks, then inserting new ones where necessary.
506where necessary.
507 507
508@findex fill-region 508@findex fill-region
509 To refill many paragraphs, use @kbd{M-x fill-region}, which 509 To refill many paragraphs, use @kbd{M-x fill-region}, which
510finds the paragraphs in the region and fills each of them. 510finds the paragraphs in the region and fills each of them.
511 511
512@kindex M-q
513@findex fill-paragraph-or-region
514 The command @kbd{M-q} (@code{fill-paragraph-or-region}), operates on
515the active region like @code{fill-region} when the mark is active in
516Transient Mark mode. Otherwise, it operates on the current paragraph
517like @code{fill-paragraph}.
518
512@findex fill-region-as-paragraph 519@findex fill-region-as-paragraph
513 @kbd{M-q} and @code{fill-region} use the same criteria as @kbd{M-h} 520 @kbd{M-q}, @code{fill-paragraph} and @code{fill-region} use the same
514for finding paragraph boundaries (@pxref{Paragraphs}). For more 521criteria as @kbd{M-h} for finding paragraph boundaries (@pxref{Paragraphs}).
515control, you can use @kbd{M-x fill-region-as-paragraph}, which refills 522For more control, you can use @kbd{M-x fill-region-as-paragraph},
516everything between point and mark as a single paragraph. This command 523which refills everything between point and mark as a single paragraph.
517deletes any blank lines within the region, so separate blocks of text 524This command deletes any blank lines within the region, so separate
518end up combined into one block. 525blocks of text end up combined into one block.
519 526
520@cindex justification 527@cindex justification
521 A numeric argument to @kbd{M-q} tells it to @dfn{justify} the text 528 A numeric argument to @kbd{M-q} tells it to @dfn{justify} the text
522as well as filling it. This means that extra spaces are inserted to 529as well as filling it. This means that extra spaces are inserted to
523make the right margin line up exactly at the fill column. To remove 530make the right margin line up exactly at the fill column. To remove
524the extra spaces, use @kbd{M-q} with no argument. (Likewise for 531the extra spaces, use @kbd{M-q} with no argument. (Likewise for
525@code{fill-region}.) Another way to control justification, and choose 532@code{fill-paragraph} and @code{fill-region}.) Another way to control
526other styles of filling, is with the @code{justification} text 533justification, and choose other styles of filling, is with the
527property; see @ref{Format Justification}. 534@code{justification} text property; see @ref{Format Justification}.
528 535
529@kindex M-s @r{(Text mode)} 536@kindex M-s @r{(Text mode)}
530@cindex centering 537@cindex centering
@@ -588,7 +595,7 @@ fill prefix automatically (@pxref{Adaptive Fill}).
588@item C-x . 595@item C-x .
589Set the fill prefix (@code{set-fill-prefix}). 596Set the fill prefix (@code{set-fill-prefix}).
590@item M-q 597@item M-q
591Fill a paragraph using current fill prefix (@code{fill-paragraph}). 598Fill a paragraph using current fill prefix (@code{fill-paragraph-or-region}).
592@item M-x fill-individual-paragraphs 599@item M-x fill-individual-paragraphs
593Fill the region, considering each change of indentation as starting a 600Fill the region, considering each change of indentation as starting a
594new paragraph. 601new paragraph.
@@ -2249,7 +2256,7 @@ margin width either with a numeric argument or in the minibuffer.
2249 2256
2250 Sometimes, as a result of editing, the filling of a paragraph becomes 2257 Sometimes, as a result of editing, the filling of a paragraph becomes
2251messed up---parts of the paragraph may extend past the left or right 2258messed up---parts of the paragraph may extend past the left or right
2252margins. When this happens, use @kbd{M-q} (@code{fill-paragraph}) to 2259margins. When this happens, use @kbd{M-q} (@code{fill-paragraph-or-region}) to
2253refill the paragraph. 2260refill the paragraph.
2254 2261
2255 The fill prefix, if any, works in addition to the specified paragraph 2262 The fill prefix, if any, works in addition to the specified paragraph