aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2006-02-08 00:21:56 +0000
committerRichard M. Stallman2006-02-08 00:21:56 +0000
commit5f4d658543589bb6ff8e0fbc0226e55ffb119978 (patch)
tree3e93409b4ed6c0248b077dc7fe7583a0d8193827
parent2b02353b7bfdf86d0c333b00896d7752a9f408e9 (diff)
downloademacs-5f4d658543589bb6ff8e0fbc0226e55ffb119978.tar.gz
emacs-5f4d658543589bb6ff8e0fbc0226e55ffb119978.zip
Minor clarifications.
(Sentences): Explain why two-space convention is better. Explain sentence-end-without-period here. (Fill Commands): Not here. (Refill): Node moved down. (Filling): Update menu. (Table Creation, Cell Justification, Column Commands): Clarify.
-rw-r--r--man/text.texi425
1 files changed, 207 insertions, 218 deletions
diff --git a/man/text.texi b/man/text.texi
index 8c624c42dde..4fb5ee9cc1e 100644
--- a/man/text.texi
+++ b/man/text.texi
@@ -12,7 +12,8 @@ computer field. One is data that is a sequence of characters. Any file
12that you edit with Emacs is text, in this sense of the word. The other 12that you edit with Emacs is text, in this sense of the word. The other
13meaning is more restrictive: a sequence of characters in a human language 13meaning is more restrictive: a sequence of characters in a human language
14for humans to read (possibly after processing by a text formatter), as 14for humans to read (possibly after processing by a text formatter), as
15opposed to a program or commands for a program. 15opposed to a program or binary data. This chapter is concerned with
16editing text in the narrower sense.
16 17
17 Human languages have syntactic/stylistic conventions that can be 18 Human languages have syntactic/stylistic conventions that can be
18supported or used to advantage by editor commands: conventions involving 19supported or used to advantage by editor commands: conventions involving
@@ -41,7 +42,7 @@ mode (@pxref{TeX Mode}).
41@ifinfo 42@ifinfo
42mode. 43mode.
43@end ifinfo 44@end ifinfo
44For input to nroff, use Nroff mode. 45For input to groff or nroff, use Nroff mode.
45 46
46 Instead of using a text formatter, you can edit formatted text in 47 Instead of using a text formatter, you can edit formatted text in
47WYSIWYG style (``what you see is what you get''), with Enriched mode. 48WYSIWYG style (``what you see is what you get''), with Enriched mode.
@@ -113,7 +114,7 @@ in the text. The analogy extends to numeric arguments, which serve as
113repeat counts. @kbd{M-f} with a negative argument moves backward, and 114repeat counts. @kbd{M-f} with a negative argument moves backward, and
114@kbd{M-b} with a negative argument moves forward. Forward motion 115@kbd{M-b} with a negative argument moves forward. Forward motion
115stops right after the last letter of the word, while backward motion 116stops right after the last letter of the word, while backward motion
116stops right before the first letter.@refill 117stops right before the first letter.
117 118
118@kindex M-d 119@kindex M-d
119@findex kill-word 120@findex kill-word
@@ -130,10 +131,10 @@ the end, and kill the word backwards with @kbd{M-@key{DEL}}.)
130@kindex M-DEL 131@kindex M-DEL
131 @kbd{M-@key{DEL}} (@code{backward-kill-word}) kills the word before 132 @kbd{M-@key{DEL}} (@code{backward-kill-word}) kills the word before
132point. It kills everything from point back to where @kbd{M-b} would 133point. It kills everything from point back to where @kbd{M-b} would
133move to. If point is after the space in @w{@samp{FOO, BAR}}, then 134move to. For instance, if point is after the space in @w{@samp{FOO,
134@w{@samp{FOO, }} is killed. (If you wish to kill just @samp{FOO}, and 135BAR}}, it kills @w{@samp{FOO, }}. If you wish to kill just
135not the comma and the space, use @kbd{M-b M-d} instead of 136@samp{FOO}, and not the comma and the space, use @kbd{M-b M-d} instead
136@kbd{M-@key{DEL}}.) 137of @kbd{M-@key{DEL}}.
137 138
138@c Don't index M-t and transpose-words here, they are indexed in 139@c Don't index M-t and transpose-words here, they are indexed in
139@c fixit.texi, in the node "Transpose". 140@c fixit.texi, in the node "Transpose".
@@ -155,9 +156,9 @@ to. @kbd{M-@@} accepts a numeric argument that says how many words to
155scan for the place to put the mark. In Transient Mark mode, this command 156scan for the place to put the mark. In Transient Mark mode, this command
156activates the mark. 157activates the mark.
157 158
158 The word commands' understanding of syntax is completely controlled by 159 The word commands' understanding of word boundaries is controlled
159the syntax table. Any character can, for example, be declared to be a word 160by the syntax table. Any character can, for example, be declared to
160delimiter. @xref{Syntax}. 161be a word delimiter. @xref{Syntax}.
161 162
162@node Sentences 163@node Sentences
163@section Sentences 164@section Sentences
@@ -206,7 +207,7 @@ beginning of the sentence. Larger arguments serve as a repeat count.
206There is also a command, @kbd{C-x @key{DEL}} 207There is also a command, @kbd{C-x @key{DEL}}
207(@code{backward-kill-sentence}), for killing back to the beginning of a 208(@code{backward-kill-sentence}), for killing back to the beginning of a
208sentence. This command is useful when you change your mind in the 209sentence. This command is useful when you change your mind in the
209middle of composing text.@refill 210middle of composing text.
210 211
211 The sentence commands assume that you follow the American typist's 212 The sentence commands assume that you follow the American typist's
212convention of putting two spaces at the end of a sentence; they consider 213convention of putting two spaces at the end of a sentence; they consider
@@ -214,34 +215,36 @@ a sentence to end wherever there is a @samp{.}, @samp{?} or @samp{!}
214followed by the end of a line or two spaces, with any number of 215followed by the end of a line or two spaces, with any number of
215@samp{)}, @samp{]}, @samp{'}, or @samp{"} characters allowed in between. 216@samp{)}, @samp{]}, @samp{'}, or @samp{"} characters allowed in between.
216A sentence also begins or ends wherever a paragraph begins or ends. 217A sentence also begins or ends wherever a paragraph begins or ends.
218It is useful to follow this convention, because it makes a distinction
219between periods that end a sentence and periods that indicate
220abbreviations; that enables the Emacs sentence commands to distinguish,
221too. These commands to not stop for periods that indicate abbreviations.
217 222
218@vindex sentence-end 223@vindex sentence-end-double-space
219 The variable @code{sentence-end} controls recognition of the end of 224 If you want to use just one space between sentences, you can set the
220a sentence. If non-@code{nil}, it is a regexp that matches the last 225variable @code{sentence-end-double-space} to @code{nil} to make the
221few characters of a sentence, together with the whitespace following 226sentence commands stop for single spaces. However, this mode has a
222the sentence. If the value is @code{nil}, the default, then Emacs 227drawback: there is no way to distinguish between periods that end
223computes the regexp according to various criteria. The result is 228sentences and those that indicate abbreviations. For convenient and
224normally similar to the following regexp: 229reliable editing, we therefore recommend you follow the two-space
225 230convention. The variable @code{sentence-end-double-space} also
226@example 231affects filling (@pxref{Fill Commands}) in related ways.
227"[.?!][]\"')]*\\($\\| $\\|\t\\| \\)[ \t\n]*"
228@end example
229
230@noindent
231This example is explained in the section on regexps. @xref{Regexp Example}.
232
233 If you want to use just one space between sentences, you should
234set @code{sentence-end} to this value:
235 232
236@example 233@vindex sentence-end
237"[.?!][]\"')]*\\($\\|\t\\| \\)[ \t\n]*" 234 The variable @code{sentence-end} controls how to recognize the end
238@end example 235of a sentence. If non-@code{nil}, it is a regexp that matches the
236last few characters of a sentence, together with the whitespace
237following the sentence. If the value is @code{nil}, the default, then
238Emacs computes the regexp according to various criteria such as the
239value of @code{sentence-end-double-space}. @xref{Regexp Example}, for
240a detailed explanation of one of the regular expressions Emacs uses
241for this purpose.
239 242
240@noindent 243@vindex sentence-end-without-period
241This is what setting the variable @code{sentence-end-double-space} to 244 Some languages do not use period to indicate end of sentence. For
242@code{nil} automatically does. But note that this makes it impossible 245example, a sentence in Thai text ends with double space but without a
243to distinguish between periods that end sentences and those that 246period. Set the variable @code{sentence-end-without-period} to
244indicate abbreviations. 247@code{t} to tell the sentence commands that a period is not necessary.
245 248
246@node Paragraphs 249@node Paragraphs
247@section Paragraphs 250@section Paragraphs
@@ -266,18 +269,20 @@ Put point and mark around this or next paragraph (@code{mark-paragraph}).
266 @kbd{M-@{} moves to the beginning of the current or previous 269 @kbd{M-@{} moves to the beginning of the current or previous
267paragraph, while @kbd{M-@}} moves to the end of the current or next 270paragraph, while @kbd{M-@}} moves to the end of the current or next
268paragraph. Blank lines and text-formatter command lines separate 271paragraph. Blank lines and text-formatter command lines separate
269paragraphs and are not considered part of any paragraph. In 272paragraphs and are not considered part of any paragraph. If there is
270Paragraph-Indent Text mode, but not in Text mode, an indented line 273a blank line before the paragraph, @kbd{M-@{} moves to the blank line,
271also starts a new paragraph. If there is a blank line before the 274because that is convenient in practice.
272paragraph, @kbd{M-@{} moves to the blank line, because that is 275
273convenient in practice. 276 In Text mode, an indented line is not a paragraph break. If you
277want indented lines to have this effect, use Paragraph-Indent Text
278mode instead. @xref{Text Mode}.
274 279
275 In major modes for programs, paragraphs begin and end only at blank 280 In major modes for programs, paragraphs begin and end only at blank
276lines. This makes the paragraph commands continue to be useful even 281lines. This makes the paragraph commands useful, even though there
277though there are no paragraphs per se. 282are no paragraphs as such in a program.
278 283
279 When there is a fill prefix, then paragraphs are delimited by all lines 284 When you have set a fill prefix, then paragraphs are delimited by
280which don't start with the fill prefix. @xref{Filling}. 285all lines which don't start with the fill prefix. @xref{Filling}.
281 286
282@kindex M-h 287@kindex M-h
283@findex mark-paragraph 288@findex mark-paragraph
@@ -399,11 +404,11 @@ Text}).
399 404
400@menu 405@menu
401* Auto Fill:: Auto Fill mode breaks long lines automatically. 406* Auto Fill:: Auto Fill mode breaks long lines automatically.
402* Refill:: Keeping paragraphs filled.
403* Fill Commands:: Commands to refill paragraphs and center lines. 407* Fill Commands:: Commands to refill paragraphs and center lines.
404* Fill Prefix:: Filling paragraphs that are indented 408* Fill Prefix:: Filling paragraphs that are indented
405 or in a comment, etc. 409 or in a comment, etc.
406* Adaptive Fill:: How Emacs can determine the fill prefix automatically. 410* Adaptive Fill:: How Emacs can determine the fill prefix automatically.
411* Refill:: Keeping paragraphs filled.
407* Longlines:: Editing text with very long lines. 412* Longlines:: Editing text with very long lines.
408@end menu 413@end menu
409 414
@@ -464,31 +469,6 @@ paragraph properly filled again is usually with the explicit fill commands.
464The section on init files says how to arrange this permanently for yourself. 469The section on init files says how to arrange this permanently for yourself.
465@xref{Init File}. 470@xref{Init File}.
466 471
467@node Refill
468@subsection Refill Mode
469@cindex refilling text, word processor style
470@cindex modes, Refill
471@cindex Refill minor mode
472
473 Refill minor mode provides support for keeping paragraphs filled as
474you type or modify them in other ways. It provides an effect similar
475to typical word processor behavior. This works by running a
476paragraph-filling command at suitable times.
477
478 To toggle the use of Refill mode in the current buffer, type
479@kbd{M-x refill-mode}. When you are typing text, only characters
480which normally trigger auto filling, like the space character, will
481trigger refilling. This is to avoid making it too slow. Apart from
482self-inserting characters, other commands which modify the text cause
483refilling.
484
485 The current implementation is preliminary and not robust. You can
486get better ``line wrapping'' behavior using Longlines mode.
487@xref{Longlines}. However, Longlines mode has an important
488side-effect: the newlines that it inserts for you are not saved to
489disk, so the files that you make with Longlines mode will appear to be
490completely unfilled if you edit them without Longlines mode.
491
492@node Fill Commands 472@node Fill Commands
493@subsection Explicit Fill Commands 473@subsection Explicit Fill Commands
494 474
@@ -515,24 +495,24 @@ where necessary.
515 495
516@findex fill-region 496@findex fill-region
517 To refill many paragraphs, use @kbd{M-x fill-region}, which 497 To refill many paragraphs, use @kbd{M-x fill-region}, which
518divides the region into paragraphs and fills each of them. 498finds the paragraphs in the region and fills each of them.
519 499
520@findex fill-region-as-paragraph 500@findex fill-region-as-paragraph
521 @kbd{M-q} and @code{fill-region} use the same criteria as @kbd{M-h} 501 @kbd{M-q} and @code{fill-region} use the same criteria as @kbd{M-h}
522for finding paragraph boundaries (@pxref{Paragraphs}). For more 502for finding paragraph boundaries (@pxref{Paragraphs}). For more
523control, you can use @kbd{M-x fill-region-as-paragraph}, which refills 503control, you can use @kbd{M-x fill-region-as-paragraph}, which refills
524everything between point and mark. This command deletes any blank lines 504everything between point and mark as a single paragraph. This command
525within the region, so separate blocks of text end up combined into one 505deletes any blank lines within the region, so separate blocks of text
526block.@refill 506end up combined into one block.
527 507
528@cindex justification 508@cindex justification
529 A numeric argument to @kbd{M-q} causes it to @dfn{justify} the text as 509 A numeric argument to @kbd{M-q} tells it to @dfn{justify} the text
530well as filling it. This means that extra spaces are inserted to make 510as well as filling it. This means that extra spaces are inserted to
531the right margin line up exactly at the fill column. To remove the 511make the right margin line up exactly at the fill column. To remove
532extra spaces, use @kbd{M-q} with no argument. (Likewise for 512the extra spaces, use @kbd{M-q} with no argument. (Likewise for
533@code{fill-region}.) Another way to control justification, and choose 513@code{fill-region}.) Another way to control justification, and choose
534other styles of filling, is with the @code{justification} text property; 514other styles of filling, is with the @code{justification} text
535see @ref{Format Justification}. 515property; see @ref{Format Justification}.
536 516
537@kindex M-s @r{(Text mode)} 517@kindex M-s @r{(Text mode)}
538@cindex centering 518@cindex centering
@@ -561,7 +541,6 @@ indicates an abbreviation and not the end of a sentence. To preserve
561the distinction between these two ways of using a period, the fill 541the distinction between these two ways of using a period, the fill
562commands do not break a line after a period followed by just one space. 542commands do not break a line after a period followed by just one space.
563 543
564@vindex sentence-end-double-space
565 If the variable @code{sentence-end-double-space} is @code{nil}, the 544 If the variable @code{sentence-end-double-space} is @code{nil}, the
566fill commands expect and leave just one space at the end of a sentence. 545fill commands expect and leave just one space at the end of a sentence.
567Ordinarily this variable is @code{t}, so the fill commands insist on 546Ordinarily this variable is @code{t}, so the fill commands insist on
@@ -571,18 +550,13 @@ two spaces for the end of a sentence, as explained above. @xref{Sentences}.
571 If the variable @code{colon-double-space} is non-@code{nil}, the 550 If the variable @code{colon-double-space} is non-@code{nil}, the
572fill commands put two spaces after a colon. 551fill commands put two spaces after a colon.
573 552
574@vindex sentence-end-without-period
575 Some languages do not use period to indicate end of sentence. For
576example, a sentence in Thai text ends with double space but without a
577period. Set the variable @code{sentence-end-without-period} to
578@code{t} to tell the sentence commands that a period is not necessary.
579
580@vindex fill-nobreak-predicate 553@vindex fill-nobreak-predicate
581 The variable @code{fill-nobreak-predicate} specifies additional 554 The variable @code{fill-nobreak-predicate} specifies additional
582conditions for where line-breaking is allowed. Its value is either 555conditions for where line-breaking is allowed. Its value is either
583@code{nil} or a Lisp function; the function is called with no 556@code{nil} or a Lisp function; the function is called with no
584arguments, and if it returns a non-@code{nil} value, then point is not 557arguments, with point at a place where Emacs is considering breaking
585a good place to break the line. Two standard functions you can use are 558the line. If the function returns a non-@code{nil} value, then that's
559a bad place to break the line. Two standard functions you can use are
586@code{fill-single-word-nobreak-p} (don't break after the first word of 560@code{fill-single-word-nobreak-p} (don't break after the first word of
587a sentence or before the last) and @code{fill-french-nobreak-p} (don't 561a sentence or before the last) and @code{fill-french-nobreak-p} (don't
588break after @samp{(} or before @samp{)}, @samp{:} or @samp{?}). 562break after @samp{(} or before @samp{)}, @samp{:} or @samp{?}).
@@ -615,20 +589,20 @@ a new paragraph.
615@findex set-fill-prefix 589@findex set-fill-prefix
616 To specify a fill prefix for the current buffer, move to a line that 590 To specify a fill prefix for the current buffer, move to a line that
617starts with the desired prefix, put point at the end of the prefix, 591starts with the desired prefix, put point at the end of the prefix,
618and give the command @w{@kbd{C-x .}}@: (@code{set-fill-prefix}). 592and type @w{@kbd{C-x .}}@: (@code{set-fill-prefix}). (That's a period
619That's a period after the @kbd{C-x}. To turn off the fill prefix, 593after the @kbd{C-x}.) To turn off the fill prefix, specify an empty
620specify an empty prefix: type @w{@kbd{C-x .}}@: with point at the 594prefix: type @w{@kbd{C-x .}}@: with point at the beginning of a line.
621beginning of a line.@refill
622 595
623 When a fill prefix is in effect, the fill commands remove the fill 596 When a fill prefix is in effect, the fill commands remove the fill
624prefix from each line before filling and insert it on each line after 597prefix from each line of the paragraph before filling and insert it on
625filling. (The beginning of the first line is left unchanged, since 598each line after filling. (The beginning of the first line of the
626often that is intentionally different.) Auto Fill mode also inserts 599paragraph is left unchanged, since often that is intentionally
627the fill prefix automatically when it makes a new line. The @kbd{C-o} 600different.) Auto Fill mode also inserts the fill prefix automatically
628command inserts the fill prefix on new lines it creates, when you use 601when it makes a new line. The @kbd{C-o} command inserts the fill
629it at the beginning of a line (@pxref{Blank Lines}). Conversely, the 602prefix on new lines it creates, when you use it at the beginning of a
630command @kbd{M-^} deletes the prefix (if it occurs) after the newline 603line (@pxref{Blank Lines}). Conversely, the command @kbd{M-^} deletes
631that it deletes (@pxref{Indentation}). 604the prefix (if it occurs) after the newline that it deletes
605(@pxref{Indentation}).
632 606
633 For example, if @code{fill-column} is 40 and you set the fill prefix 607 For example, if @code{fill-column} is 40 and you set the fill prefix
634to @samp{;; }, then @kbd{M-q} in the following text 608to @samp{;; }, then @kbd{M-q} in the following text
@@ -749,6 +723,31 @@ line, and it should return the appropriate fill prefix based on that
749line. If it returns @code{nil}, @code{adaptive-fill-regexp} gets 723line. If it returns @code{nil}, @code{adaptive-fill-regexp} gets
750a chance to find a prefix. 724a chance to find a prefix.
751 725
726@node Refill
727@subsection Refill Mode
728@cindex refilling text, word processor style
729@cindex modes, Refill
730@cindex Refill minor mode
731
732 Refill minor mode provides support for keeping paragraphs filled as
733you type or modify them in other ways. It provides an effect similar
734to typical word processor behavior. This works by running a
735paragraph-filling command at suitable times.
736
737 To toggle the use of Refill mode in the current buffer, type
738@kbd{M-x refill-mode}. When you are typing text, only characters
739which normally trigger auto filling, like the space character, will
740trigger refilling. This is to avoid making it too slow. Apart from
741self-inserting characters, other commands which modify the text cause
742refilling.
743
744 The current implementation is preliminary and not robust. You can
745get better ``line wrapping'' behavior using Longlines mode.
746@xref{Longlines}. However, Longlines mode has an important
747side-effect: the newlines that it inserts for you are not saved to
748disk, so the files that you make with Longlines mode will appear to be
749completely unfilled if you edit them without Longlines mode.
750
752@node Longlines 751@node Longlines
753@subsection Long Lines Mode 752@subsection Long Lines Mode
754@cindex refilling text, word processor style 753@cindex refilling text, word processor style
@@ -786,11 +785,11 @@ line wrapping, with @kbd{C-u M-x longlines-auto-wrap}. To turn
786automatic line wrapping back on, type @kbd{M-x longlines-auto-wrap}. 785automatic line wrapping back on, type @kbd{M-x longlines-auto-wrap}.
787 786
788@findex longlines-show-hard-newlines 787@findex longlines-show-hard-newlines
789 Whenever you type @kbd{RET}, you are inserting a hard newline. If 788 Type @kbd{RET} to insert a hard newline, one which automatic
790you want to see where all the hard newlines are, type @kbd{M-x 789refilling will not remove. If you want to see where all the hard
791longlines-show-hard-newlines}. This will mark each hard newline with 790newlines are, type @kbd{M-x longlines-show-hard-newlines}. This will
792a special symbol. The same command with a prefix argument turns this 791mark each hard newline with a special symbol. The same command with a
793display off. 792prefix argument turns this display off.
794 793
795 Long Lines mode does not change normal text files that are already 794 Long Lines mode does not change normal text files that are already
796filled, since the existing newlines are considered hard newlines. 795filled, since the existing newlines are considered hard newlines.
@@ -845,10 +844,11 @@ to the appropriate number of words before point, but do not move point.
845This is convenient when you have just typed a word in the wrong case: you 844This is convenient when you have just typed a word in the wrong case: you
846can give the case conversion command and continue typing. 845can give the case conversion command and continue typing.
847 846
848 If a word case conversion command is given in the middle of a word, it 847 If a word case conversion command is given in the middle of a word,
849applies only to the part of the word which follows point. This is just 848it applies only to the part of the word which follows point. (This is
850like what @kbd{M-d} (@code{kill-word}) does. With a negative argument, 849comparable to what @kbd{M-d} (@code{kill-word}) does.) With a
851case conversion applies only to the part of the word before point. 850negative argument, case conversion applies only to the part of the
851word before point.
852 852
853@kindex C-x C-l 853@kindex C-x C-l
854@kindex C-x C-u 854@kindex C-x C-u
@@ -888,22 +888,23 @@ the previous line.
888 Text mode turns off the features concerned with comments except when 888 Text mode turns off the features concerned with comments except when
889you explicitly invoke them. It changes the syntax table so that 889you explicitly invoke them. It changes the syntax table so that
890single-quotes are considered part of words. However, if a word starts 890single-quotes are considered part of words. However, if a word starts
891with single-quotes, then these are treated as a prefix for purposes 891with single-quotes, these are treated as a prefix for purposes such as
892such as capitalization. That is, @kbd{M-c} will convert 892capitalization. That is, @kbd{M-c} will convert @samp{'hello'} into
893@samp{'hello'} into @samp{'Hello'}, as expected. 893@samp{'Hello'}, as expected.
894 894
895@cindex Paragraph-Indent Text mode 895@cindex Paragraph-Indent Text mode
896@cindex mode, Paragraph-Indent Text 896@cindex mode, Paragraph-Indent Text
897@findex paragraph-indent-text-mode 897@findex paragraph-indent-text-mode
898@findex paragraph-indent-minor-mode 898@findex paragraph-indent-minor-mode
899 If you indent the first lines of paragraphs, then you should use 899 If you indent the first lines of paragraphs, then you should use
900Paragraph-Indent Text mode rather than Text mode. In this mode, you do 900Paragraph-Indent Text mode rather than Text mode. In this mode, you
901not need to have blank lines between paragraphs, because the first-line 901do not need to have blank lines between paragraphs, because the
902indentation is sufficient to start a paragraph; however paragraphs in 902first-line indentation is sufficient to start a paragraph; however
903which every line is indented are not supported. Use @kbd{M-x 903paragraphs in which every line is indented are not supported. Use
904paragraph-indent-text-mode} to enter this mode. Use @kbd{M-x 904@kbd{M-x paragraph-indent-text-mode} to enter this mode. Use @kbd{M-x
905paragraph-indent-minor-mode} to enter an equivalent minor mode, for 905paragraph-indent-minor-mode} to enable an equivalent minor mode in
906instance during mail composition. 906situations where you can't change the major mode---in mail
907composition, for instance.
907 908
908@kindex M-TAB @r{(Text mode)} 909@kindex M-TAB @r{(Text mode)}
909 Text mode, and all the modes based on it, define @kbd{M-@key{TAB}} 910 Text mode, and all the modes based on it, define @kbd{M-@key{TAB}}
@@ -1083,7 +1084,7 @@ heading line. @kbd{C-c C-p} (@code{outline-previous-visible-heading}) moves
1083similarly backward. Both accept numeric arguments as repeat counts. The 1084similarly backward. Both accept numeric arguments as repeat counts. The
1084names emphasize that invisible headings are skipped, but this is not really 1085names emphasize that invisible headings are skipped, but this is not really
1085a special feature. All editing commands that look for lines ignore the 1086a special feature. All editing commands that look for lines ignore the
1086invisible lines automatically.@refill 1087invisible lines automatically.
1087 1088
1088@findex outline-up-heading 1089@findex outline-up-heading
1089@findex outline-forward-same-level 1090@findex outline-forward-same-level
@@ -1164,7 +1165,7 @@ and @kbd{C-c C-s} (@code{show-subtree}). Both apply to the current
1164heading line's @dfn{subtree}: its body, all its subheadings, both 1165heading line's @dfn{subtree}: its body, all its subheadings, both
1165direct and indirect, and all of their bodies. In other words, the 1166direct and indirect, and all of their bodies. In other words, the
1166subtree contains everything following the current heading line, up to 1167subtree contains everything following the current heading line, up to
1167and not including the next heading of the same or higher rank.@refill 1168and not including the next heading of the same or higher rank.
1168 1169
1169@findex hide-leaves 1170@findex hide-leaves
1170@findex show-branches 1171@findex show-branches
@@ -1181,7 +1182,7 @@ bodies or make the subheadings visible. They are @kbd{C-c C-l}
1181 A little weaker than @code{show-branches} is @kbd{C-c C-i} 1182 A little weaker than @code{show-branches} is @kbd{C-c C-i}
1182(@code{show-children}). It makes just the direct subheadings 1183(@code{show-children}). It makes just the direct subheadings
1183visible---those one level down. Deeper subheadings remain invisible, if 1184visible---those one level down. Deeper subheadings remain invisible, if
1184they were invisible.@refill 1185they were invisible.
1185 1186
1186@findex hide-body 1187@findex hide-body
1187@findex show-all 1188@findex show-all
@@ -1356,13 +1357,14 @@ automatically by putting this in your @file{.emacs} file:
1356@findex slitex-mode 1357@findex slitex-mode
1357@findex doctex-mode 1358@findex doctex-mode
1358 1359
1359 @TeX{} is a powerful text formatter written by Donald Knuth; it is also 1360 @TeX{} is a powerful text formatter written by Donald Knuth; it is
1360free, like GNU Emacs. La@TeX{} is a simplified input format for @TeX{}, 1361also free software, like GNU Emacs. La@TeX{} is a simplified input
1361implemented by @TeX{} macros; it comes with @TeX{}. Sli@TeX{} is a special 1362format for @TeX{}, implemented by @TeX{} macros; it comes with @TeX{}.
1362form of La@TeX{}.@footnote{Sli@TeX{} is obsoleted by the @samp{slides} 1363Sli@TeX{} is a special form of La@TeX{}.@footnote{Sli@TeX{} is
1363document class in recent La@TeX{} versions.} Doc@TeX{} (@file{.dtx}) 1364obsoleted by the @samp{slides} document class in recent La@TeX{}
1364is a special file format in which the La@TeX{} sources are written, 1365versions.} Doc@TeX{} (@file{.dtx}) is a special file format in which
1365combining sources with documentation. 1366the La@TeX{} sources are written, combining sources with
1367documentation.
1366 1368
1367 Emacs has a special @TeX{} mode for editing @TeX{} input files. 1369 Emacs has a special @TeX{} mode for editing @TeX{} input files.
1368It provides facilities for checking the balance of delimiters and for 1370It provides facilities for checking the balance of delimiters and for
@@ -1611,7 +1613,7 @@ C-l}.
1611 1613
1612 Type @kbd{C-c C-k} (@code{tex-kill-job}) to kill the @TeX{} process if 1614 Type @kbd{C-c C-k} (@code{tex-kill-job}) to kill the @TeX{} process if
1613you see that its output is no longer useful. Using @kbd{C-c C-b} or 1615you see that its output is no longer useful. Using @kbd{C-c C-b} or
1614@kbd{C-c C-r} also kills any @TeX{} process still running.@refill 1616@kbd{C-c C-r} also kills any @TeX{} process still running.
1615 1617
1616@findex tex-region 1618@findex tex-region
1617@kindex C-c C-r @r{(@TeX{} mode)} 1619@kindex C-c C-r @r{(@TeX{} mode)}
@@ -1838,7 +1840,7 @@ used as a cheap preview.
1838@vindex sgml-xml-mode 1840@vindex sgml-xml-mode
1839 SGML mode and HTML mode support XML also. In XML, every opening tag 1841 SGML mode and HTML mode support XML also. In XML, every opening tag
1840must have an explicit closing tag. When @code{sgml-xml-mode} is 1842must have an explicit closing tag. When @code{sgml-xml-mode} is
1841non-@code{nil}, SGML mode (and HTML mode) always insert explicit 1843non-@code{nil}, SGML mode and HTML mode always insert explicit
1842closing tags. When you visit a file, these modes determine from the 1844closing tags. When you visit a file, these modes determine from the
1843file contents whether it is XML or not, and set @code{sgml-xml-mode} 1845file contents whether it is XML or not, and set @code{sgml-xml-mode}
1844accordingly, so that they do the right thing for the file in either 1846accordingly, so that they do the right thing for the file in either
@@ -2380,7 +2382,7 @@ appropriate, use @code{format-find-file} with suitable arguments.
2380@cindex table mode 2382@cindex table mode
2381@cindex text-based tables 2383@cindex text-based tables
2382 2384
2383 Table Mode provides an easy and intuitive way to create and edit WYSIWYG 2385 Table mode provides an easy and intuitive way to create and edit WYSIWYG
2384text-based tables. Here is an example of such a table: 2386text-based tables. Here is an example of such a table:
2385 2387
2386@smallexample 2388@smallexample
@@ -2402,7 +2404,7 @@ text-based tables. Here is an example of such a table:
2402+-----------------+--------------------------------+-----------------+ 2404+-----------------+--------------------------------+-----------------+
2403@end smallexample 2405@end smallexample
2404 2406
2405 Table Mode allows the contents of the table such as this one to be 2407 Table mode allows the contents of the table such as this one to be
2406easily manipulated by inserting or deleting characters inside a cell. 2408easily manipulated by inserting or deleting characters inside a cell.
2407A cell is effectively a localized rectangular edit region and edits to 2409A cell is effectively a localized rectangular edit region and edits to
2408a cell do not affect the contents of the surrounding cells. If the 2410a cell do not affect the contents of the surrounding cells. If the
@@ -2428,8 +2430,8 @@ growth of the cell.
2428@node Table Definition 2430@node Table Definition
2429@subsection What is a Text-based Table? 2431@subsection What is a Text-based Table?
2430 2432
2431 Look at the following examples of valid tables as a reference while 2433 Keep the following examples of valid tables in mind as a reference
2432you read this section: 2434while you read this section:
2433 2435
2434@example 2436@example
2435 +--+----+---+ +-+ +--+-----+ 2437 +--+----+---+ +-+ +--+-----+
@@ -2441,15 +2443,13 @@ you read this section:
2441 +-----+--+ 2443 +-----+--+
2442@end example 2444@end example
2443 2445
2444 A table consists of a rectangular frame and the contents inside the 2446 A table consists of a rectangular frame whose inside is divided into
2445frame. A table's cells must be at least one character wide and one 2447cells. Each cell must be at least one character wide and one
2446character high with two adjacent cells sharing a boarder line. A cell 2448character high, not counting its border lines. A cell can be
2447can be subdivided into multiple rectangular cells but cannot nest or 2449subdivided into multiple rectangular cells, but cells cannot overlap.
2448overlap.
2449 2450
2450 Both the table frame and cell border lines must consist of one of 2451 The table frame and cell border lines are made of three special
2451three special characters. The variables that hold these characters 2452characters. These variables specify those characters:
2452are described below:
2453 2453
2454@table @code 2454@table @code
2455@vindex table-cell-vertical-char 2455@vindex table-cell-vertical-char
@@ -2487,10 +2487,10 @@ From left to right:
2487 2487
2488@enumerate a 2488@enumerate a
2489@item 2489@item
2490Nested cells are not allowed.
2491@item
2492Overlapped cells or non-rectangular cells are not allowed. 2490Overlapped cells or non-rectangular cells are not allowed.
2493@item 2491@item
2492Same as a.
2493@item
2494The border must be rectangular. 2494The border must be rectangular.
2495@item 2495@item
2496Cells must have a minimum width/height of one character. 2496Cells must have a minimum width/height of one character.
@@ -2506,16 +2506,15 @@ Same as d.
2506@findex table-insert 2506@findex table-insert
2507 The command to create a table is @code{table-insert}. When called 2507 The command to create a table is @code{table-insert}. When called
2508interactively, it asks for the number of columns, number of rows, cell 2508interactively, it asks for the number of columns, number of rows, cell
2509width and cell height. The number of columns is a number of cells 2509width and cell height. The number of columns is the number of cells
2510within the table's width. The number of rows is the number of cells 2510horizontally side by side. The number of rows is the number of cells
2511within the table's height. The cell width is a number of characters 2511vertically within the table's height. The cell width is a number of
2512that fit within a cell width. The cell height is a number of lines 2512characters that each cell holds, left to right. The cell height is a
2513within cell height. While the number of columns and number of rows 2513number of lines each cell holds. The cell width and the cell height
2514must be an integer number, the cell width and the cell height can be 2514can be either an integer (when the value is constant across the table)
2515either an integer number (when the value is constant across the table) 2515or a series of integer, separated by spaces or commas, where each
2516or a series of integer numbers, separated by spaces or commas, where 2516number corresponds to the next cell within a row from left to right,
2517each number corresponds to each cell width within a row from left to 2517or the next cell within a column from top to bottom.
2518right or each cell height within a column from top to bottom.
2519 2518
2520@node Table Recognition 2519@node Table Recognition
2521@subsection Table Recognition 2520@subsection Table Recognition
@@ -2523,7 +2522,7 @@ right or each cell height within a column from top to bottom.
2523 2522
2524@findex table-recognize 2523@findex table-recognize
2525@findex table-unrecognize 2524@findex table-unrecognize
2526 Table Mode maintains special text properties in the buffer to allow 2525 Table mode maintains special text properties in the buffer to allow
2527editing in a convenient fashion. When a buffer with tables is saved 2526editing in a convenient fashion. When a buffer with tables is saved
2528to its file, these text properties are lost, so when you visit this 2527to its file, these text properties are lost, so when you visit this
2529file again later, Emacs does not see a table, but just formatted text. 2528file again later, Emacs does not see a table, but just formatted text.
@@ -2531,15 +2530,10 @@ To resurrect the table text properties, issue the @kbd{M-x
2531table-recognize} command. It scans the current buffer, recognizes 2530table-recognize} command. It scans the current buffer, recognizes
2532valid table cells, and attaches appropriate text properties to allow 2531valid table cells, and attaches appropriate text properties to allow
2533for table editing. The converse command, @code{table-unrecognize}, is 2532for table editing. The converse command, @code{table-unrecognize}, is
2534used to remove the special text properties and revert the buffer back 2533used to remove the special text properties and convert the buffer back
2535to plain text. 2534to plain text.
2536 2535
2537 An optional numeric prefix argument can precede the 2536 Special commands exist to enable or disable tables within a region,
2538@code{table-recognize} command. If the argument is negative, tables
2539in the buffer become inactive. This is equivalent to invoking
2540@code{table-unrecognize}.
2541
2542 Similar functions exist to enable or disable tables within a region,
2543enable or disable individual tables, and enable/disable individual 2537enable or disable individual tables, and enable/disable individual
2544cells. These commands are: 2538cells. These commands are:
2545 2539
@@ -2575,10 +2569,10 @@ Conversion}.
2575 The commands @code{table-forward-cell} and 2569 The commands @code{table-forward-cell} and
2576@code{table-backward-cell} move point from the current cell to an 2570@code{table-backward-cell} move point from the current cell to an
2577adjacent cell forward and backward respectively. The order of the 2571adjacent cell forward and backward respectively. The order of the
2578cell is wrapped. When point is positioned in the last cell of a 2572cells is cyclic: when point is in the last cell of a table, typing
2579table, typing @kbd{M-x table-forward-cell} moves point to the first 2573@kbd{M-x table-forward-cell} moves to the first cell in the table.
2580cell in the table. Likewise @kbd{M-x table-backward-cell} from the 2574Likewise @kbd{M-x table-backward-cell} from the first cell in a table
2581first cell in a table moves point to the last cell in the table. 2575moves to the last cell.
2582 2576
2583@findex table-span-cell 2577@findex table-span-cell
2584 The command @code{table-span-cell} spans the current cell into one 2578 The command @code{table-span-cell} spans the current cell into one
@@ -2602,18 +2596,17 @@ point is located. The content in the original cell is split as well.
2602@findex table-split-cell-horizontally 2596@findex table-split-cell-horizontally
2603 The command @code{table-split-cell-horizontally} splits the current 2597 The command @code{table-split-cell-horizontally} splits the current
2604cell horizontally and creates a pair of cells right and left of where 2598cell horizontally and creates a pair of cells right and left of where
2605point is located. If the subject cell to split is not empty the user 2599point is located. If the cell being split is not empty, this asks you
2606is asked how to handle the cell contents. The three options are: 2600how to handle the cell contents. The three options are: @code{split},
2607@code{split}, @code{left}, or @code{right}. @code{split} splits the 2601@code{left}, or @code{right}. @code{split} splits the contents at
2608contents at point literally while the @code{left} and @code{right} 2602point literally, while the @code{left} and @code{right} options move
2609options move the entire contents into the left or right cell 2603the entire contents into the left or right cell respectively.
2610respectively.
2611 2604
2612@cindex enlarge a table cell 2605@cindex enlarge a table cell
2613@cindex shrink a table cell 2606@cindex shrink a table cell
2614 The next four commands enlarge or shrink a cell. These commands 2607 The next four commands enlarge or shrink a cell. They use numeric
2615accept numeric arguments (@pxref{Arguments}) to specify how many 2608arguments (@pxref{Arguments}) to specify how many columns or rows to
2616columns or rows to enlarge or shrink a particular table. 2609enlarge or shrink a particular table.
2617 2610
2618@table @kbd 2611@table @kbd
2619@findex table-heighten-cell 2612@findex table-heighten-cell
@@ -2639,21 +2632,20 @@ is remembered independently for each cell and the subsequent editing
2639of cell contents is subject to the specified justification. 2632of cell contents is subject to the specified justification.
2640 2633
2641@findex table-justify 2634@findex table-justify
2642 The command @code{table-justify} requests the user to specify what 2635 The command @code{table-justify} ask you to specify what to justify:
2643to justify: a cell,a column, or a row. If you select cell 2636a cell, a column, or a row. If you select cell justification, this
2644justification, this command sets the justification only to the current 2637command sets the justification only for the current cell. Selecting
2645cell. Selecting column or row justification set the justification to 2638column or row justification sets the justification for all the cells
2646all the cells within a column or row respectively. The command then 2639within a column or row respectively. The command then ask you which
2647requests the user to enter which justification to apply: @code{left}, 2640kind of justification to apply: @code{left}, @code{center},
2648@code{center}, @code{right}, @code{top}, @code{middle}, @code{bottom}, 2641@code{right}, @code{top}, @code{middle}, @code{bottom}, or
2649or @code{none}. The options @code{left}, @code{center}, and 2642@code{none}. Horizontal justification and vertical justification are
2643specified independently. The options @code{left}, @code{center}, and
2650@code{right} specify horizontal justification while the options 2644@code{right} specify horizontal justification while the options
2651@code{top}, @code{middle}, @code{bottom}, and @code{none} specify 2645@code{top}, @code{middle}, @code{bottom}, and @code{none} specify
2652vertical justification. The vertical justification @code{none} 2646vertical justification. The vertical justification @code{none}
2653effectively removes vertical justification while horizontal 2647effectively removes vertical justification. Horizontal justification
2654justification must be one of @code{left}, @code{center}, or 2648must be one of @code{left}, @code{center}, or @code{right}.
2655@code{right}. Horizontal justification and vertical justification are
2656specified independently.
2657 2649
2658@vindex table-detect-cell-alignment 2650@vindex table-detect-cell-alignment
2659 Justification information is stored in the buffer as a part of text 2651 Justification information is stored in the buffer as a part of text
@@ -2667,8 +2659,8 @@ the contents of a cell are examined to determine which justification
2667was originally applied to the cell and then applies this justification 2659was originally applied to the cell and then applies this justification
2668to the cell. This is a speculative algorithm and is therefore not 2660to the cell. This is a speculative algorithm and is therefore not
2669perfect, however, the justification is deduced correctly most of the 2661perfect, however, the justification is deduced correctly most of the
2670time. If you desire to disable this feature, customize the variable 2662time. To disable this feature, customize the variable
2671@code{table-detect-cell-alignment} to set it to @code{nil}. 2663@code{table-detect-cell-alignment} and set it to @code{nil}.
2672 2664
2673@node Row Commands 2665@node Row Commands
2674@subsection Commands for Table Rows 2666@subsection Commands for Table Rows
@@ -2681,7 +2673,7 @@ the current row in a table. The current row where point is located is
2681pushed down after the newly inserted row. A numeric prefix argument 2673pushed down after the newly inserted row. A numeric prefix argument
2682specifies the number of rows to insert. Note that in order to insert 2674specifies the number of rows to insert. Note that in order to insert
2683rows @emph{after} the last row at the bottom of a table, you must 2675rows @emph{after} the last row at the bottom of a table, you must
2684place point below the table, i.e.@: outside the table, prior to 2676place point below the table---that is, outside the table---prior to
2685invoking this command. 2677invoking this command.
2686 2678
2687@cindex delete row in table 2679@cindex delete row in table
@@ -2696,12 +2688,11 @@ A numeric prefix argument specifies the number of rows to delete.
2696@cindex insert column in table 2688@cindex insert column in table
2697@findex table-insert-column 2689@findex table-insert-column
2698 The command @code{table-insert-column} inserts a column of cells to 2690 The command @code{table-insert-column} inserts a column of cells to
2699the left of the current row in a table. The current column where 2691the left of the current row in a table. This pushes the current
2700point is located at is pushed right of the newly inserted column. To 2692column to the right. To insert a column to the right side of the
2701insert a column to the right side of the right most column, place 2693rightmost column, place point to the right of the rightmost column,
2702point to the right of the rightmost column, which is outside of the 2694which is outside of the table, prior to invoking this command. A
2703table, prior to invoking this command. A numeric prefix argument 2695numeric prefix argument specifies the number of columns to insert.
2704specifies the number of columns to insert.
2705 2696
2706@cindex delete column in table 2697@cindex delete column in table
2707 A command @code{table-delete-column} deletes a column of cells at 2698 A command @code{table-delete-column} deletes a column of cells at
@@ -2714,11 +2705,10 @@ delete.
2714 2705
2715@findex table-fixed-width-mode 2706@findex table-fixed-width-mode
2716 The command @code{table-fixed-width-mode} toggles fixed width mode 2707 The command @code{table-fixed-width-mode} toggles fixed width mode
2717on and off. When the fixed width mode is turned on, editing inside a 2708on and off. When fixed width mode is turned on, editing inside a
2718cell never changes the cell width; when it is off, the cell width 2709cell never changes the cell width; when it is off, the cell width
2719expands automatically in order to prevent a word from being folded 2710expands automatically in order to prevent a word from being folded
2720into multiple lines. By default, the fixed width mode is turned off. 2711into multiple lines. By default, fixed width mode is disabled.
2721
2722 2712
2723@node Table Conversion 2713@node Table Conversion
2724@subsection Conversion Between Plain Text and Tables 2714@subsection Conversion Between Plain Text and Tables
@@ -2731,9 +2721,11 @@ turns it into a table. Unlike @code{table-recognize} (@pxref{Table
2731Recognition}), the original text does not have a table appearance but 2721Recognition}), the original text does not have a table appearance but
2732may hold a logical table structure. For example, some elements 2722may hold a logical table structure. For example, some elements
2733separated by known patterns form a two dimensional structure which can 2723separated by known patterns form a two dimensional structure which can
2734be turned into a table. Look at the numbers below. The numbers are 2724be turned into a table.
2735horizontally separated by a comma and vertically separated by a 2725
2736newline character. 2726 Here's an example of data that @code{table-capture} can operate on.
2727The numbers are horizontally separated by a comma and vertically
2728separated by a newline character.
2737 2729
2738@example 2730@example
27391, 2, 3, 4 27311, 2, 3, 4
@@ -2742,8 +2734,7 @@ newline character.
2742@end example 2734@end example
2743 2735
2744@noindent 2736@noindent
2745When you invoke @kbd{M-x table-capture} on the above three-line 2737Invoking @kbd{M-x table-capture} on that text produces this table:
2746region, the region can be turned into the next table:
2747 2738
2748@example 2739@example
2749+-----+-----+-----+-----+ 2740+-----+-----+-----+-----+
@@ -2756,9 +2747,9 @@ region, the region can be turned into the next table:
2756@end example 2747@end example
2757 2748
2758@noindent 2749@noindent
2759where @samp{,} is used for a column delimiter regexp, a newline is 2750The conversion uses @samp{,} for the column delimiter and newline for
2760used for a row delimiter regexp, cells are left justified, and minimum 2751a row delimiter, cells are left justified, and minimum cell width is
2761cell width is 5. 27525.
2762 2753
2763@findex table-release 2754@findex table-release
2764 The command @code{table-release} does the opposite of 2755 The command @code{table-release} does the opposite of
@@ -2771,7 +2762,7 @@ lines):
2771 2762
2772@example 2763@example
2773@samp{table-capture} is a powerful command however mastering its power 2764@samp{table-capture} is a powerful command however mastering its power
2774requires some practice. Here is a list of items what it can do. 2765requires some practice. Here are some things it can do:
2775 2766
2776Parse Cell Items By using column delimiter regular 2767Parse Cell Items By using column delimiter regular
2777 expression and raw delimiter regular 2768 expression and raw delimiter regular
@@ -2797,9 +2788,8 @@ following one.
2797@c produced output!! 2788@c produced output!!
2798@example 2789@example
2799+-----------------------------------------------------------------+ 2790+-----------------------------------------------------------------+
2800|@samp{table-capture} is a powerful command however mastering its | 2791|@samp{table-capture} is a powerful command, but mastering its |
2801|power requires some practice. Here is a list of items what it | 2792|power requires some practice. Here are some things it can do: |
2802|can do. |
2803| | 2793| |
2804|Parse Cell Items By using column delimiter regular | 2794|Parse Cell Items By using column delimiter regular |
2805| expression and raw delimiter regular | 2795| expression and raw delimiter regular |
@@ -2822,9 +2812,8 @@ independently without affecting the layout of other cells.
2822 2812
2823@example 2813@example
2824+-----------------------------------------------------------------+ 2814+-----------------------------------------------------------------+
2825|@samp{table-capture} is a powerful command however mastering its | 2815|@samp{table-capture} is a powerful command, but mastering its |
2826|power requires some practice. Here is a list of items what it | 2816|power requires some practice. Here are some things it can do: |
2827|can do. |
2828+---------------------+-------------------------------------------+ 2817+---------------------+-------------------------------------------+
2829|Parse Cell Items |By using column delimiter regular | 2818|Parse Cell Items |By using column delimiter regular |
2830| |expression and raw delimiter regular | 2819| |expression and raw delimiter regular |
@@ -2877,7 +2866,7 @@ increasing integer numbers.
2877@cindex table in language format 2866@cindex table in language format
2878@cindex table for HTML and LaTeX 2867@cindex table for HTML and LaTeX
2879@findex table-generate-source 2868@findex table-generate-source
2880The command @code{table-generate-source} generates a table formatted 2869 The command @code{table-generate-source} generates a table formatted
2881for a specific markup language. It asks for a language (which must be 2870for a specific markup language. It asks for a language (which must be
2882one of @code{html}, @code{latex}, or @code{cals}), a destination 2871one of @code{html}, @code{latex}, or @code{cals}), a destination
2883buffer where to put the result, and the table caption (a string), and 2872buffer where to put the result, and the table caption (a string), and