diff options
Diffstat (limited to 'doc/emacs/text.texi')
-rw-r--r-- | doc/emacs/text.texi | 67 |
1 files changed, 44 insertions, 23 deletions
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index 54e16698a74..dc8ca903b72 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi @@ -61,7 +61,7 @@ use Picture mode, a special major mode for editing such pictures. @cindex autotyping @cindex automatic typing The automatic typing features may be useful when writing text. -@inforef{Top,The Autotype Manual,autotype}. +@xref{Top, Autotyping, The Autotype Manual, autotype}. @end ifinfo @menu @@ -421,13 +421,12 @@ beginning of a line. @cindex curved quotes @cindex guillemets @findex electric-quote-mode -@c The funny quoting below is to make the printed version look -@c correct. FIXME. + One common way to quote is the typewriter convention, which quotes -using straight apostrophes @t{'like this'} or double-quotes @t{"like +using straight apostrophes @samp{'like this'} or double-quotes @samp{"like this"}. Another common way is the curved quote convention, which uses -left and right single or double quotation marks `@t{like this}' or -``@t{like this}''@footnote{ +left and right single or double quotation marks @t{‘like this’} or +@t{“like this”}@footnote{ The curved single quote characters are U+2018 @sc{left single quotation mark} and U+2019 @sc{right single quotation mark}; the curved double quotes are U+201C @sc{left double quotation mark} and U+201D @sc{right double @@ -445,7 +444,7 @@ default quotes listed above, by customizing the variable @code{electric-quote-chars}, a list of four characters, where the items correspond to the left single quote, the right single quote, the left double quote and the right double quote, respectively, whose -default value is @code{'(?@r{`} ?@r{'} ?@r{``} ?@r{''})}. +default value is @w{@code{'(@w{?}‘ ?’ ?“ ?”)}}. @vindex electric-quote-paragraph @vindex electric-quote-comment @@ -461,7 +460,7 @@ variables. @vindex electric-quote-replace-double You can also set the option @code{electric-quote-replace-double} to -a non-@code{nil} value. Then, typing @t{"} insert an appropriate +a non-@code{nil} value. Then, typing @kbd{"} insert an appropriate curved double quote depending on context: @t{“} at the beginning of the buffer or after a line break, whitespace, opening parenthesis, or quote character, and @t{”} otherwise. @@ -473,7 +472,7 @@ To toggle it globally, type type @kbd{C-q `} or @kbd{C-q '} instead of @kbd{`} or @kbd{'}. To insert a curved quote even when Electric Quote is disabled or inactive, you can type @kbd{C-x 8 [} for @t{‘}, @kbd{C-x 8 ]} for -@t{’}, @kbd{C-x 8 @{} for ``, and @kbd{C-x 8 @}} for ''. +@t{’}, @kbd{C-x 8 @{} for @t{“}, and @kbd{C-x 8 @}} for @t{”}. @xref{Inserting Text}. Note that the value of @code{electric-quote-chars} does not affect these keybindings, they are not keybindings of @code{electric-quote-mode} but bound in @@ -502,8 +501,8 @@ text. @cindex mode, Auto Fill @dfn{Auto Fill} mode is a buffer-local minor mode (@pxref{Minor -Modes}) in which lines are broken automatically at spaces when the -line becomes too wide. +Modes}) in which lines are broken automatically when the line becomes +too wide and you type @kbd{@key{SPC}} or @kbd{@key{RET}}. @table @kbd @item M-x auto-fill-mode @@ -522,12 +521,21 @@ certain major modes, add @code{auto-fill-mode} to the mode hooks (@pxref{Major Modes}). When Auto Fill mode is enabled, the mode indicator @samp{Fill} appears in the mode line (@pxref{Mode Line}). - Auto Fill mode breaks lines automatically at spaces whenever they -get longer than the desired width. This line breaking occurs only -when you type @key{SPC} or @key{RET}. If you wish to insert a space -or newline without permitting line-breaking, type @kbd{C-q @key{SPC}} -or @kbd{C-q C-j} respectively. Also, @kbd{C-o} inserts a newline -without line breaking. + Auto Fill mode breaks lines automatically at the appropriate places +whenever lines get longer than the desired width. This line breaking +occurs only when you type @kbd{@key{SPC}} or @kbd{@key{RET}}. If you +wish to insert a space or newline without permitting line-breaking, +type @kbd{C-q @key{SPC}} or @kbd{C-q C-j} respectively. Also, +@kbd{C-o} inserts a newline without line breaking. + +@cindex kinsoku line-breaking rules + The place where Auto Fill breaks a line depends on the line's +characters. For characters from @acronym{ASCII}, Latin, and most +other scripts Emacs breaks a line on space characters, to keep the +words intact. But for CJK scripts, a line can be broken between any +two characters. (If you load the @file{kinsoku} library, Emacs will +avoid breaking a line between certain pairs of CJK characters, where +special rules prohibit that.) When Auto Fill mode breaks a line, it tries to obey the @dfn{adaptive fill prefix}: if a fill prefix can be deduced from the @@ -549,6 +557,9 @@ described in the next section. (@pxref{Fill Commands}). @end ifnottex + A similar feature that wraps long lines automatically at display +time is Visual Line Mode (@pxref{Visual Line Mode}). + @node Fill Commands @subsection Explicit Fill Commands @@ -561,7 +572,7 @@ Set the fill column (@code{set-fill-column}). Fill each paragraph in the region (@code{fill-region}). @item M-x fill-region-as-paragraph Fill the region, considering it as one paragraph. -@item M-o M-s +@item M-x center-line Center a line. @end table @@ -571,7 +582,11 @@ Center a line. current paragraph. It redistributes the line breaks within the paragraph, and deletes any excess space and tab characters occurring within the paragraph, in such a way that the lines end up fitting -within a certain maximum width. +within a certain maximum width. Like Auto Fill mode, this and other +filling commands usually break lines at space characters, but for CJK +characters these commands can break a line between almost any two +characters, and they can also obey the kinsoku rules. @xref{Auto +Fill}. @findex fill-region Normally, @kbd{M-q} acts on the paragraph where point is, but if @@ -606,10 +621,9 @@ numeric argument, it uses that as the new fill column. With just @kbd{C-u} as argument, it sets @code{fill-column} to the current horizontal position of point. -@kindex M-o M-s @r{(Text mode)} @cindex centering @findex center-line - The command @kbd{M-o M-s} (@code{center-line}) centers the current line + The command @kbd{M-x center-line} centers the current line within the current fill column. With an argument @var{n}, it centers @var{n} lines individually and moves past them. This binding is made by Text mode and is available only in that and related modes @@ -645,8 +659,8 @@ or before @samp{)}, @samp{:} or @samp{?}); and even if preceded by a non-whitespace character). Emacs can display an indicator in the @code{fill-column} position -using the Display fill column indicator mode -(@pxref{Displaying Boundaries, display-fill-column-indicator}). +using the Display fill column indicator mode (@pxref{Displaying +Boundaries, display-fill-column-indicator}). @node Fill Prefix @subsection The Fill Prefix @@ -982,6 +996,13 @@ specific file (@pxref{File Variables}). major mode's special commands. (The variable @code{outline-minor-mode-prefix} controls the prefix used.) +@vindex outline-minor-mode-cycle + If the @code{outline-minor-mode-cycle} user option is +non-@code{nil}, the @kbd{TAB} and @kbd{S-TAB} keys are enabled on the +outline heading lines. @kbd{TAB} cycles hiding, showing the +sub-heading, and showing all for the current section. @kbd{S-TAB} +does the same for the entire buffer. + @menu * Outline Format:: What the text of an outline looks like. * Outline Motion:: Special commands for moving through outlines. |