@c This is part of the Emacs manual.
-@c Copyright (C) 1985,86,87,93,94,95,97,2000,2001
+@c Copyright (C) 1985,86,87,93,94,95,97,2000,2001, 2002
@c Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Text, Programs, Indentation, Top
@xref{Formatted Text}.
@end iftex
+@cindex skeletons
+@cindex templates
+@cindex autotyping
+@cindex automatic typing
The ``automatic typing'' features may be useful when writing text.
@xref{Top,, Autotyping, autotype, Features for Automatic Typing}.
* Text Mode:: The major modes for editing text files.
* Outline Mode:: Editing outlines.
* TeX Mode:: Editing input to the formatter TeX.
-* HTML Mode:: Editing HTML files.
+* HTML Mode:: Editing HTML, SGML, and XML files.
* Nroff Mode:: Editing input to the formatter nroff.
* Formatted Text:: Editing formatted text directly in WYSIWYG fashion.
@end menu
@findex center-line
The command @kbd{M-s} (@code{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.
+@var{n} lines individually and moves past them. This binding is
+made by Text mode and is available only in that and related modes
+(@pxref{Text Mode}).
@vindex fill-column
@kindex C-x f
@menu
* Format: Outline Format. What the text of an outline looks like.
* Motion: Outline Motion. Special commands for moving through
- outlines.
+ outlines.
* Visibility: Outline Visibility. Commands to control what is visible.
* Views: Outline Views. Outlines and multiple views.
* Foldout:: Folding editing.
invisible (@code{hide-leaves}).
@item C-c C-k
Make all subheadings of this heading line, at all levels, visible
-(@code{show-branches}).
+(@code{show-branches}).
@item C-c C-i
Make immediate subheadings (one level down) of this heading line
visible (@code{show-children}).
setting @code{selective-display-ellipses} to @code{nil}. Then there is
no visible indication of the presence of invisible lines.
+@findex reveal-mode
When incremental search finds text that is hidden by Outline mode,
it makes that part of the buffer visible. If you exit the search
-at that position, the text remains visible.
+at that position, the text remains visible. You can also
+automatically make text visible as you navigate in it by using
+@kbd{M-x reveal-mode}.
@node Outline Views
@subsection Viewing One Outline in Multiple Views
(eval-after-load "outline" '(require 'foldout))
@end example
-@node TeX Mode, Nroff Mode, Outline Mode, Text
+@node TeX Mode
@section @TeX{} Mode
@cindex @TeX{} mode
@cindex La@TeX{} mode
Ref@TeX{}. @xref{Top, , RefTeX, reftex}.
@node HTML Mode
-@section SGML and HTML Modes
+@section SGML, XML, and HTML Modes
The major modes for SGML and HTML include indentation support and
commands to operate on tags. This section describes the special
@item C-c /
@kindex C-c / @r{(SGML mode)}
@findex sgml-close-tag
-Insert a close tag for the innermost unterminated tag (@code{sgml-close-tag}).
+Insert a close tag for the innermost unterminated tag
+(@code{sgml-close-tag}). If called from within a tag or a comment,
+close this element instead of inserting a close tag.
@item C-c 8
@kindex C-c 8 @r{(SGML mode)}
@findex sgml-validate
Run a shell command (which you must specify) to validate the current
buffer as SGML (@code{sgml-validate}).
+
+@item C-x TAB
+@kindex C-c TAB @r{(SGML mode)}
+@findex sgml-tags-invisible
+Toggle the visibility of existing tags in the buffer. This can be
+used as a cheap preview.
@end table
@vindex sgml-xml-mode
non-@code{nil}, SGML mode (and HTML mode) always insert explicit
closing tags. When you visit a file, these modes determine from the
file contents whether it is XML or not, and set @code{sgml-xml-mode}
-accordingly, so that they does the right thing for the file in either
+accordingly, so that they do the right thing for the file in either
case.
@node Nroff Mode
* Color: Format Colors. Changing the color of text.
* Indent: Format Indentation. Changing the left and right margins.
* Justification: Format Justification.
- Centering, setting text flush with the
+ Centering, setting text flush with the
left or right margin, etc.
* Other: Format Properties. The "special" text properties submenu.
* Forcing Enriched Mode:: How to force use of Enriched mode.
@node Format Justification
@subsection Justification in Formatted Text
-
+
When editing formatted text, you can specify various styles of
justification for a paragraph. The style you specify automatically
affects the Emacs fill commands.
The default justification style is specified by the variable
@code{default-justification}. Its value should be one of the symbols
@code{left}, @code{right}, @code{full}, @code{center}, or @code{none}.
-
+
@node Format Properties
@subsection Setting Other Text Properties
Emacs does the necessary conversions on the text which you insert, but
it does not enable Enriched mode. If you wish to do that, type @kbd{M-x
enriched-mode}.
-@end itemize
+@end itemize
The command @code{format-decode-buffer} translates text in various
formats into Emacs's internal format. It asks you to specify the format
but allow character code conversion and/or automatic uncompression if
appropriate, use @code{format-find-file} with suitable arguments.
+@ignore
+ arch-tag: 8db54ed8-2036-49ca-b0df-23811d03dc70
+@end ignore