diff options
| author | Juri Linkov | 2007-10-06 22:23:41 +0000 |
|---|---|---|
| committer | Juri Linkov | 2007-10-06 22:23:41 +0000 |
| commit | a850cafb704a44871880711fc3eb687c47c4cd76 (patch) | |
| tree | bfce66ef11e0fb7573fb5c07a0e455d62b3756b5 | |
| parent | 3220ac7f5e6bde4e38c5eb8a91c6366b1abbd86e (diff) | |
| download | emacs-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.texi | 43 |
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 |
| 489 | Fill current paragraph (@code{fill-paragraph}). | 489 | Fill current paragraph or active region (@code{fill-paragraph-or-region}). |
| 490 | @item C-x f | 490 | @item C-x f |
| 491 | Set the fill column (@code{set-fill-column}). | 491 | Set the fill column (@code{set-fill-column}). |
| 492 | @item M-x fill-paragraph | ||
| 493 | Fill current paragraph (@code{fill-paragraph}). | ||
| 492 | @item M-x fill-region | 494 | @item M-x fill-region |
| 493 | Fill each paragraph in the region (@code{fill-region}). | 495 | Fill 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. | |||
| 497 | Center a line. | 499 | Center 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 | 504 | on the paragraph that point is inside, or the one after point if point |
| 504 | inside, or the one after point if point is between paragraphs. | 505 | is between paragraphs. Refilling works by removing all the |
| 505 | Refilling works by removing all the line-breaks, then inserting new ones | 506 | line-breaks, then inserting new ones where necessary. |
| 506 | where 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 |
| 510 | finds the paragraphs in the region and fills each of them. | 510 | finds 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 | ||
| 515 | the active region like @code{fill-region} when the mark is active in | ||
| 516 | Transient Mark mode. Otherwise, it operates on the current paragraph | ||
| 517 | like @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 |
| 514 | for finding paragraph boundaries (@pxref{Paragraphs}). For more | 521 | criteria as @kbd{M-h} for finding paragraph boundaries (@pxref{Paragraphs}). |
| 515 | control, you can use @kbd{M-x fill-region-as-paragraph}, which refills | 522 | For more control, you can use @kbd{M-x fill-region-as-paragraph}, |
| 516 | everything between point and mark as a single paragraph. This command | 523 | which refills everything between point and mark as a single paragraph. |
| 517 | deletes any blank lines within the region, so separate blocks of text | 524 | This command deletes any blank lines within the region, so separate |
| 518 | end up combined into one block. | 525 | blocks 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 |
| 522 | as well as filling it. This means that extra spaces are inserted to | 529 | as well as filling it. This means that extra spaces are inserted to |
| 523 | make the right margin line up exactly at the fill column. To remove | 530 | make the right margin line up exactly at the fill column. To remove |
| 524 | the extra spaces, use @kbd{M-q} with no argument. (Likewise for | 531 | the 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 |
| 526 | other styles of filling, is with the @code{justification} text | 533 | justification, and choose other styles of filling, is with the |
| 527 | property; 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 . |
| 589 | Set the fill prefix (@code{set-fill-prefix}). | 596 | Set the fill prefix (@code{set-fill-prefix}). |
| 590 | @item M-q | 597 | @item M-q |
| 591 | Fill a paragraph using current fill prefix (@code{fill-paragraph}). | 598 | Fill 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 |
| 593 | Fill the region, considering each change of indentation as starting a | 600 | Fill the region, considering each change of indentation as starting a |
| 594 | new paragraph. | 601 | new 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 |
| 2251 | messed up---parts of the paragraph may extend past the left or right | 2258 | messed up---parts of the paragraph may extend past the left or right |
| 2252 | margins. When this happens, use @kbd{M-q} (@code{fill-paragraph}) to | 2259 | margins. When this happens, use @kbd{M-q} (@code{fill-paragraph-or-region}) to |
| 2253 | refill the paragraph. | 2260 | refill 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 |