summaryrefslogtreecommitdiff
path: root/doc/emacs/text.texi
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2011-12-04 00:17:29 +0800
committerChong Yidong <cyd@gnu.org>2011-12-04 00:17:29 +0800
commit8863a584c26fa9583be51b544cfd4cadf60740ea (patch)
treedc1992aa6a410d0fc37b03c64468550792b8b054 /doc/emacs/text.texi
parent6fdebe937101d3a09a9f95f5c3470b8bf7812b5e (diff)
More updates to the Text chapter of the Emacs manual, and related nodes.
Make the documentation of Enriched Mode shorter, since it's practically unused. * text.texi (TeX Mode): Mention AUCTeX package. (TeX Editing): Add xref to documentation for Occur. (LaTeX Editing): Add xref to Completion node. (TeX Print): Fix description of tex-directory. (Enriched Text): Renamed from Formatted Text. Make this node and its subnodes less verbose, since text/enriched files are practically unused. (Enriched Mode): Renamed from Requesting Formatted Text. (Format Colors): Node deleted. (Enriched Faces): Renamed from Format Faces. Describe commands for applying colors too. (Forcing Enriched Mode): Node deleted; merged into Enriched Mode. * frames.texi (Menu Mouse Clicks): Tweak description of C-Mouse-2. * display.texi (Colors): New node. * cmdargs.texi (Colors X): * xresources.texi (GTK styles): * custom.texi (Face Customization): Reference it. * glossary.texi (Glossary): Remove "formatted text" and "WYSIWYG". Link to Fill Commands for Justification entry.
Diffstat (limited to 'doc/emacs/text.texi')
-rw-r--r--doc/emacs/text.texi888
1 files changed, 359 insertions, 529 deletions
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi
index 241acbaf33..8f353961af 100644
--- a/doc/emacs/text.texi
+++ b/doc/emacs/text.texi
@@ -32,10 +32,9 @@ structure.
@findex nxml-mode
Emacs has other major modes for text which contains ``embedded''
commands, such as @TeX{} and La@TeX{} (@pxref{TeX Mode}); HTML and
-SGML (@pxref{HTML Mode}); XML (@pxref{Top, nXML Mode,,nxml-mode, nXML
-Mode}); and Groff and Nroff (@pxref{Nroff Mode}). In addition, you
-can edit formatted text in WYSIWYG style (``what you see is what you
-get''), using Enriched mode (@pxref{Formatted Text}).
+SGML (@pxref{HTML Mode}); XML (@pxref{Top,The nXML Mode
+Manual,,nxml-mode, nXML Mode}); and Groff and Nroff (@pxref{Nroff
+Mode}).
@cindex ASCII art
If you need to edit pictures made out of text characters (commonly
@@ -48,13 +47,14 @@ for editing such pictures.
@xref{Picture Mode}.
@end ifnottex
-
+@ifinfo
@cindex skeletons
@cindex templates
@cindex autotyping
@cindex automatic typing
The ``automatic typing'' features may be useful when writing text.
-@inforef{Top,, autotype}.
+@inforef{Top,The Autotype Manual,autotype}.
+@end ifinfo
@menu
* Words:: Moving over and killing words.
@@ -68,8 +68,8 @@ for editing such pictures.
* TeX Mode:: Editing input to the formatter TeX.
* HTML Mode:: Editing HTML and SGML files.
* Nroff Mode:: Editing input to the formatter nroff.
-* Formatted Text:: Editing formatted text directly in WYSIWYG fashion.
-* Text Based Tables:: Editing text-based tables in WYSIWYG fashion.
+* Enriched Text:: Editing text ``enriched'' with fonts, colors, etc.
+* Text Based Tables:: Commands for editing text-based tables.
* Two-Column:: Splitting text columns into separate windows.
@end menu
@@ -651,7 +651,8 @@ per-buffer variable; altering the variable affects only the current buffer,
but there is a default value which you can change as well. @xref{Locals}.
The @code{indentation} text property provides another way to control
-the amount of indentation paragraphs receive. @xref{Format Indentation}.
+the amount of indentation paragraphs receive. @xref{Enriched
+Indentation}.
@node Adaptive Fill
@subsection Adaptive Filling
@@ -808,10 +809,10 @@ indenting the current line. @xref{Indentation}, for details.
Text mode turns off the features concerned with comments except when
you explicitly invoke them. It changes the syntax table so that
-single-quotes are considered part of words (e.g. @samp{don't} is
+single-quotes are considered part of words (e.g.@: @samp{don't} is
considered one word). However, if a word starts with a single-quote,
it is treated as a prefix for the purposes of capitalization
-(e.g. @kbd{M-c} converts @samp{'hello'} into @samp{'Hello'}, as
+(e.g.@: @kbd{M-c} converts @samp{'hello'} into @samp{'Hello'}, as
expected).
@cindex Paragraph-Indent Text mode
@@ -1086,9 +1087,9 @@ direct and indirect, and all of their bodies.
current heading line as well as all the bodies in its subtree; the
subheadings themselves are left visible. The command @kbd{C-c C-k}
(@code{show-branches}) reveals the subheadings, if they had previously
-been hidden (e.g. by @kbd{C-c C-d}). The command @kbd{C-c C-i}
+been hidden (e.g.@: by @kbd{C-c C-d}). The command @kbd{C-c C-i}
(@code{show-children}) is a weaker version of this; it reveals just
-the direct subheadings, i.e. those one level down.
+the direct subheadings, i.e.@: those one level down.
@findex hide-other
@kindex C-c C-o @r{(Outline mode)}
@@ -1285,18 +1286,48 @@ Emacs does not guess right, you can select the correct variant of
@TeX{} mode using the command @kbd{M-x plain-tex-mode}, @kbd{M-x
latex-mode}, @kbd{M-x slitex-mode}, or @kbd{doctex-mode}.
- Emacs also provides Bib@TeX{} mode, a major mode for editing
-Bib@TeX{} files. Bib@TeX{} is a tool for storing and formatting
-bibliographic references, which is commonly used together with
-La@TeX{}. In addition, the Ref@TeX{} package provides a minor mode
-which can be used in conjunction with La@TeX{} mode to manage
-bibliographic references. @inforef{Top,, reftex}.
+ The following sections document the features of @TeX{} mode and its
+variants. There are several other @TeX{}-related Emacs packages,
+which are not documented in this manual:
+
+@itemize @bullet
+@item
+Bib@TeX{} mode is a major mode for Bib@TeX{} files, which are commonly
+used for keeping bibliographic references for La@TeX{} documents. For
+more information, see the documentation string for the command
+@code{bibtex-mode}.
+
+@item
+The Ref@TeX{} package provides a minor mode which can be used in
+conjunction with La@TeX{} mode to manage bibliographic references.
+@ifinfo
+@xref{Top,The Ref@TeX{} Manual,,reftex}.
+@end ifinfo
+@ifnotinfo
+For more information, see the Ref@TeX{} Info manual, which is
+distributed with Emacs.
+@end ifnotinfo
+
+@item
+The AUC@TeX{} package provides more advanced features for editing
+@TeX{} and its related formats, including the ability to preview
+@TeX{} equations within Emacs buffers. Unlike Bib@TeX{} mode and the
+Ref@TeX{} package, AUC@TeX{} is not distributed with Emacs by default.
+It can be downloaded via the Package Menu (@pxref{Packages}); once
+installed, see
+@ifinfo
+@ref{Top,The AUC@TeX{} Manual,,auctex}.
+@end ifinfo
+@ifnotinfo
+the AUC@TeX{} manual, which is included with the package.
+@end ifnotinfo
+@end itemize
@menu
-* Editing: TeX Editing. Special commands for editing in TeX mode.
-* LaTeX: LaTeX Editing. Additional commands for LaTeX input files.
-* Printing: TeX Print. Commands for printing part of a file with TeX.
-* Misc: TeX Misc. Customization of TeX mode, and related features.
+* TeX Editing:: Special commands for editing in TeX mode.
+* LaTeX Editing:: Additional commands for LaTeX input files.
+* TeX Print:: Commands for printing part of a file with TeX.
+* TeX Misc:: Customization of TeX mode, and related features.
@end menu
@node TeX Editing
@@ -1321,12 +1352,10 @@ Move forward past the next unmatched close brace (@code{up-list}).
@findex tex-insert-quote
@kindex " @r{(@TeX{} mode)}
In @TeX{}, the character @samp{"} is not normally used; instead,
-quotations begin with @samp{``} and end with @samp{''}. For
-convenience, @TeX{} mode overrides the normal meaning of the key
-@kbd{"} with a command that inserts a pair of single-quotes or
-backquotes (@code{tex-insert-quote}). To be precise, it inserts
-@samp{``} after whitespace or an open brace, @samp{"} after a
-backslash, and @samp{''} after any other character.
+quotations begin with @samp{``} and end with @samp{''}. @TeX{} mode
+therefore binds the @kbd{"} key to the @code{tex-insert-quote}
+command. This inserts @samp{``} after whitespace or an open brace,
+@samp{"} after a backslash, and @samp{''} after any other character.
As a special exception, if you type @kbd{"} when the text before
point is either @samp{``} or @samp{''}, Emacs replaces that preceding
@@ -1334,9 +1363,6 @@ text with a single @samp{"} character. You can therefore type
@kbd{""} to insert @samp{"}, should you ever need to do so. (You can
also use @kbd{C-q "} to insert this character.)
- To disable the @kbd{"} expansion feature, eliminate that binding in
-the local map (@pxref{Key Bindings}).
-
In @TeX{} mode, @samp{$} has a special syntax code which attempts to
understand the way @TeX{} math mode delimiters match. When you insert a
@samp{$} that is meant to exit math mode, the position of the matching
@@ -1361,13 +1387,14 @@ text that belongs inside. Afterward, use the command @kbd{C-c @}}
@findex tex-validate-region
@findex tex-terminate-paragraph
@kindex C-j @r{(@TeX{} mode)}
- There are two commands for checking the matching of braces. @kbd{C-j}
-(@code{tex-terminate-paragraph}) checks the paragraph before point, and
-inserts two newlines to start a new paragraph. It outputs a message in
-the echo area if any mismatch is found. @kbd{M-x tex-validate-region}
-checks a region, paragraph by paragraph. The errors are listed in the
-@samp{*Occur*} buffer, and you can use @kbd{C-c C-c} or @kbd{Mouse-2} in
-that buffer to go to a particular mismatch.
+ There are two commands for checking the matching of braces.
+@kbd{C-j} (@code{tex-terminate-paragraph}) checks the paragraph before
+point, and inserts two newlines to start a new paragraph. It outputs
+a message in the echo area if any mismatch is found. @kbd{M-x
+tex-validate-region} checks a region, paragraph by paragraph. The
+errors are listed in an @samp{*Occur*} buffer; you can use the usual
+Occur mode commands in that buffer, such as @kbd{C-c C-c}, to visit a
+particular mismatch (@pxref{Other Repeating Search}).
Note that Emacs commands count square brackets and parentheses in
@TeX{} mode, not just braces. This is not strictly correct for the
@@ -1379,8 +1406,8 @@ to work with them.
@node LaTeX Editing
@subsection La@TeX{} Editing Commands
- La@TeX{} mode (and its obsolete variant, Sli@TeX{} mode) provide a
-few extra features not applicable to plain @TeX{}:
+ La@TeX{} mode provides a few extra features not applicable to plain
+@TeX{}:
@table @kbd
@item C-c C-o
@@ -1393,60 +1420,59 @@ Close the innermost La@TeX{} block not yet closed
@findex tex-latex-block
@kindex C-c C-o @r{(La@TeX{} mode)}
-@vindex latex-block-names
- In La@TeX{} input, @samp{\begin} and @samp{\end} commands are used to
-group blocks of text. To insert a @samp{\begin} and a matching
-@samp{\end} (on a new line following the @samp{\begin}), use @kbd{C-c
-C-o} (@code{tex-latex-block}). A blank line is inserted between the
-two, and point is left there. You can use completion when you enter the
-block type; to specify additional block type names beyond the standard
-list, set the variable @code{latex-block-names}. For example, here's
-how to add @samp{theorem}, @samp{corollary}, and @samp{proof}:
+ In La@TeX{} input, @samp{\begin} and @samp{\end} tags are used to
+group blocks of text. To insert a block, type @kbd{C-c C-o}
+(@code{tex-latex-block}). This prompts for a block type, and inserts
+the appropriate matching @samp{\begin} and @samp{\end} tags, leaving a
+blank line between the two and moving point there.
-@example
-(setq latex-block-names '("theorem" "corollary" "proof"))
-@end example
+@vindex latex-block-names
+ When entering the block type argument to @kbd{C-c C-o}, you can use
+the usual completion commands (@pxref{Completion}). The default
+completion list contains the standard La@TeX{} block types. If you
+want additional block types for completion, customize the list
+variable @code{latex-block-names}.
@findex tex-close-latex-block
@kindex C-c C-e @r{(La@TeX{} mode)}
- In La@TeX{} input, @samp{\begin} and @samp{\end} commands must
-balance. You can use @kbd{C-c C-e} (@code{tex-close-latex-block}) to
-insert automatically a matching @samp{\end} to match the last unmatched
-@samp{\begin}. It indents the @samp{\end} to match the corresponding
-@samp{\begin}. It inserts a newline after @samp{\end} if point is at
-the beginning of a line.
+ In La@TeX{} input, @samp{\begin} and @samp{\end} tags must balance.
+You can use @kbd{C-c C-e} (@code{tex-close-latex-block}) to insert an
+@samp{\end} tag which matches the last unmatched @samp{\begin}. It
+also indents the @samp{\end} to match the corresponding @samp{\begin},
+and inserts a newline after the @samp{\end} tag if point is at the
+beginning of a line.
@node TeX Print
@subsection @TeX{} Printing Commands
- You can invoke @TeX{} as an inferior of Emacs on either the entire
-contents of the buffer or just a region at a time. Running @TeX{} in
-this way on just one chapter is a good way to see what your changes
-look like without taking the time to format the entire file.
+ You can invoke @TeX{} as an subprocess of Emacs, supplying either
+the entire contents of the buffer or just part of it (e.g.@: one
+chapter of a larger document).
@table @kbd
+@item C-c C-b
+Invoke @TeX{} on the entire current buffer (@code{tex-buffer}).
@item C-c C-r
Invoke @TeX{} on the current region, together with the buffer's header
(@code{tex-region}).
-@item C-c C-b
-Invoke @TeX{} on the entire current buffer (@code{tex-buffer}).
-@item C-c @key{TAB}
-Invoke Bib@TeX{} on the current file (@code{tex-bibtex-file}).
@item C-c C-f
Invoke @TeX{} on the current file (@code{tex-file}).
-@item C-c C-l
-Recenter the window showing output from the inferior @TeX{} so that
-the last line can be seen (@code{tex-recenter-output-buffer}).
-@item C-c C-k
-Kill the @TeX{} subprocess (@code{tex-kill-job}).
-@item C-c C-p
-Print the output from the last @kbd{C-c C-r}, @kbd{C-c C-b}, or @kbd{C-c
-C-f} command (@code{tex-print}).
+
@item C-c C-v
Preview the output from the last @kbd{C-c C-r}, @kbd{C-c C-b}, or @kbd{C-c
C-f} command (@code{tex-view}).
-@item C-c C-q
-Show the printer queue (@code{tex-show-print-queue}).
+
+@item C-c C-p
+Print the output from the last @kbd{C-c C-b}, @kbd{C-c C-r}, or
+@kbd{C-c C-f} command (@code{tex-print}).
+
+@item C-c @key{TAB}
+Invoke Bib@TeX{} on the current file (@code{tex-bibtex-file}).
+@item C-c C-l
+Recenter the window showing output from @TeX{} so that the last line
+can be seen (@code{tex-recenter-output-buffer}).
+@item C-c C-k
+Kill the @TeX{} subprocess (@code{tex-kill-job}).
@item C-c C-c
Invoke some other compilation command on the entire current buffer
(@code{tex-compile}).
@@ -1454,49 +1480,51 @@ Invoke some other compilation command on the entire current buffer
@findex tex-buffer
@kindex C-c C-b @r{(@TeX{} mode)}
-@findex tex-print
-@kindex C-c C-p @r{(@TeX{} mode)}
@findex tex-view
@kindex C-c C-v @r{(@TeX{} mode)}
-@findex tex-show-print-queue
-@kindex C-c C-q @r{(@TeX{} mode)}
- You can pass the current buffer through an inferior @TeX{} by means of
-@kbd{C-c C-b} (@code{tex-buffer}). The formatted output appears in a
-temporary file; to print it, type @kbd{C-c C-p} (@code{tex-print}).
-Afterward, you can use @kbd{C-c C-q} (@code{tex-show-print-queue}) to
-view the progress of your output towards being printed. If your terminal
-has the ability to display @TeX{} output files, you can preview the
-output on the terminal with @kbd{C-c C-v} (@code{tex-view}).
+@findex tex-print
+@kindex C-c C-p @r{(@TeX{} mode)}
+ To pass the current buffer through @TeX{}, type @kbd{C-c C-b}
+(@code{tex-buffer}). The formatted output goes in a temporary file,
+normally a @file{.dvi} file. Afterwards, you can type @kbd{C-c C-v}
+(@code{tex-view}) to launch an external program, such as
+@command{xdvi}, to view this output file. You can also type @kbd{C-c
+C-p} (@code{tex-print}) to print a hardcopy of the output file.
@cindex @env{TEXINPUTS} environment variable
@vindex tex-directory
- You can specify the directory to use for running @TeX{} by setting the
-variable @code{tex-directory}. @code{"."} is the default value. If
-your environment variable @env{TEXINPUTS} contains relative directory
-names, or if your files contains @samp{\input} commands with relative
-file names, then @code{tex-directory} @emph{must} be @code{"."} or you
-will get the wrong results. Otherwise, it is safe to specify some other
-directory, such as @code{"/tmp"}.
+ By default, @kbd{C-c C-b} runs @TeX{} in the current directory. The
+output of @TeX{} also goes in this directory. To run @TeX{} in a
+different directory, change the variable @code{tex-directory} to the
+desired directory name. If your environment variable @env{TEXINPUTS}
+contains relative directory names, or if your files contains
+@samp{\input} commands with relative file names, then
+@code{tex-directory} @emph{must} be @code{"."} or you will get the
+wrong results. Otherwise, it is safe to specify some other directory,
+such as @code{"/tmp"}.
@vindex tex-run-command
@vindex latex-run-command
-@vindex slitex-run-command
-@vindex tex-dvi-print-command
@vindex tex-dvi-view-command
-@vindex tex-show-queue-command
- If you want to specify which shell commands are used in the inferior @TeX{},
-you can do so by setting the values of the variables @code{tex-run-command},
-@code{latex-run-command}, @code{slitex-run-command},
-@code{tex-dvi-print-command}, @code{tex-dvi-view-command}, and
-@code{tex-show-queue-command}. The default values may
-(or may not) be appropriate for your system.
-
- Normally, the file name given to these commands comes at the end of
-the command string; for example, @samp{latex @var{filename}}. In some
-cases, however, the file name needs to be embedded in the command; an
-example is when you need to provide the file name as an argument to one
-command whose output is piped to another. You can specify where to put
-the file name with @samp{*} in the command string. For example,
+@vindex tex-dvi-print-command
+ The buffer's @TeX{} variant determines what shell command @kbd{C-c
+C-b} actually runs. In Plain @TeX{} mode, it is specified by the
+variable @code{tex-run-command}, which defaults to @code{"tex"}. In
+La@TeX{} mode, it is specified by @code{latex-run-command}, which
+defaults to @code{"latex"}. The shell command that @kbd{C-c C-v} runs
+to view the @file{.dvi} output is determined by the variable
+@code{tex-dvi-view-command}, regardless of the @TeX{} variant. The
+shell command that @kbd{C-c C-p} runs to print the output is
+determined by the variable @code{tex-dvi-print-command}.
+
+ Normally, Emacs automatically appends the output file name to the
+shell command strings described in the preceding paragraph. For
+example, if @code{tex-dvi-view-command} is @code{"xdvi"}, @kbd{C-c
+C-v} runs @command{xdvi @var{output-file-name}}. In some cases,
+however, the file name needs to be embedded in the command, e.g.@: if
+you need to provide the file name as an argument to one command whose
+output is piped to another. You can specify where to put the file
+name with @samp{*} in the command string. For example,
@example
(setq tex-dvi-print-command "dvips -f * | lpr")
@@ -1506,12 +1534,12 @@ the file name with @samp{*} in the command string. For example,
@kindex C-c C-k @r{(@TeX{} mode)}
@findex tex-recenter-output-buffer
@kindex C-c C-l @r{(@TeX{} mode)}
- The terminal output from @TeX{}, including any error messages, appears
-in a buffer called @samp{*tex-shell*}. If @TeX{} gets an error, you can
-switch to this buffer and feed it input (this works as in Shell mode;
-@pxref{Interactive Shell}). Without switching to this buffer you can
-scroll it so that its last line is visible by typing @kbd{C-c
-C-l}.
+ The terminal output from @TeX{}, including any error messages,
+appears in a buffer called @samp{*tex-shell*}. If @TeX{} gets an
+error, you can switch to this buffer and feed it input (this works as
+in Shell mode; @pxref{Interactive Shell}). Without switching to this
+buffer you can scroll it so that its last line is visible by typing
+@kbd{C-c C-l}.
Type @kbd{C-c C-k} (@code{tex-kill-job}) to kill the @TeX{} process if
you see that its output is no longer useful. Using @kbd{C-c C-b} or
@@ -1519,14 +1547,14 @@ you see that its output is no longer useful. Using @kbd{C-c C-b} or
@findex tex-region
@kindex C-c C-r @r{(@TeX{} mode)}
- You can also pass an arbitrary region through an inferior @TeX{} by typing
-@kbd{C-c C-r} (@code{tex-region}). This is tricky, however, because most files
-of @TeX{} input contain commands at the beginning to set parameters and
-define macros, without which no later part of the file will format
-correctly. To solve this problem, @kbd{C-c C-r} allows you to designate a
-part of the file as containing essential commands; it is included before
-the specified region as part of the input to @TeX{}. The designated part
-of the file is called the @dfn{header}.
+ You can also pass an arbitrary region through @TeX{} by typing
+@kbd{C-c C-r} (@code{tex-region}). This is tricky, however, because
+most files of @TeX{} input contain commands at the beginning to set
+parameters and define macros, without which no later part of the file
+will format correctly. To solve this problem, @kbd{C-c C-r} allows
+you to designate a part of the file as containing essential commands;
+it is included before the specified region as part of the input to
+@TeX{}. The designated part of the file is called the @dfn{header}.
@cindex header (@TeX{} mode)
To indicate the bounds of the header in Plain @TeX{} mode, you insert two
@@ -1624,29 +1652,6 @@ keys (@pxref{Completion}).
The commands @kbd{M-x iso-iso2tex}, @kbd{M-x iso-tex2iso}, @kbd{M-x
iso-iso2gtex} and @kbd{M-x iso-gtex2iso} can be used to convert
between Latin-1 encoded files and @TeX{}-encoded equivalents.
-@ignore
-@c Too cryptic to be useful, too cryptic for me to make it better -- rms.
- They
-are included by default in the @code{format-alist} variable, so they
-can be used with @kbd{M-x format-find-file}, for instance.
-@end ignore
-
-@ignore @c Not worth documenting if it is only for Czech -- rms.
-@findex tildify-buffer
-@findex tildify-region
-@cindex ties, @TeX{}, inserting
-@cindex hard spaces, @TeX{}, inserting
- The commands @kbd{M-x tildify-buffer} and @kbd{M-x tildify-region}
-insert @samp{~} (@dfn{tie}) characters where they are conventionally
-required. This is set up for Czech---customize the group
-@samp{tildify} for other languages or for other sorts of markup.
-@end ignore
-
-@cindex Ref@TeX{} package
-@cindex references, La@TeX{}
-@cindex La@TeX{} references
- For managing all kinds of references for La@TeX{}, you can use
-Ref@TeX{}. @inforef{Top,, reftex}.
@node HTML Mode
@section SGML and HTML Modes
@@ -1749,22 +1754,27 @@ used as a cheap preview (@code{sgml-tags-invisible}).
@cindex mode, nXML
@findex nxml-mode
@cindex XML schema
- The default mode for editing XML documents is called nXML mode
-(@code{xml-mode} or @code{nxml-mode}). This is a powerful major mode
-that can recognize many existing XML schema and use them to provide
-completion of XML elements via @kbd{C-@key{RET}} or @kbd{M-@key{TAB}},
-as well as ``on-the-fly'' XML validation with error highlighting. It
-is described in its own manual. @xref{Top, nXML Mode,,nxml-mode, nXML
-Mode}.
+ The major mode for editing XML documents is called nXML mode. This
+is a powerful major mode that can recognize many existing XML schema
+and use them to provide completion of XML elements via
+@kbd{C-@key{RET}} or @kbd{M-@key{TAB}}, as well as ``on-the-fly'' XML
+validation with error highlighting. To enable nXML mode in an
+existing buffer, type @kbd{M-x nxml-mode}, or, equivalently, @kbd{M-x
+xml-mode}. Emacs uses nXML mode for files which have the extension
+@file{.xml}. For XHTML files, which have the extension @file{.xhtml},
+Emacs uses HTML mode by default; you can make it use nXML mode by
+customizing the variable @code{auto-mode-alist} (@pxref{Choosing
+Modes}). nXML mode is described in its own manual: @xref{Top, nXML
+Mode,,nxml-mode, nXML Mode}.
@vindex sgml-xml-mode
- However, you can also use SGML mode to edit XML, since XML is a
-strict subset of SGML. In XML, every opening tag must have an
-explicit closing tag. When the variable @code{sgml-xml-mode} is
-non-@code{nil}, the tag insertion commands described above always
-insert explicit closing tags as well. When you visit a file in SGML
-mode, Emacs determines whether it is XML by examining the file
-contents, and sets @code{sgml-xml-mode} accordingly.
+ You may choose to use the less powerful SGML mode for editing XML,
+since XML is a strict subset of SGML. To enable SGML mode in an
+existing buffer, type @kbd{M-x sgml-mode}. On enabling SGML mode,
+Emacs examines the buffer to determine whether it is XML; if so, it
+sets the variable @code{sgml-xml-mode} to a non-@code{nil} value.
+This causes SGML mode's tag insertion commands, described above, to
+always insert explicit closing tags as well.
@node Nroff Mode
@section Nroff Mode
@@ -1815,86 +1825,84 @@ header level).
Entering Nroff mode runs the hook @code{text-mode-hook}, followed by
the hook @code{nroff-mode-hook} (@pxref{Hooks}).
-@node Formatted Text
-@section Editing Formatted Text
-
+@node Enriched Text
+@section Enriched Text
@cindex Enriched mode
@cindex mode, Enriched
-@cindex formatted text
+@cindex enriched text
@cindex WYSIWYG
@cindex word processing
- @dfn{Enriched mode} is a minor mode for editing files that contain
-formatted text in WYSIWYG fashion, as in a word processor. Currently,
-formatted text in Enriched mode can specify fonts, colors, underlining,
-margins, and types of filling and justification. In the future, we plan
-to implement other formatting features as well.
+@cindex text/enriched MIME format
- Enriched mode is a minor mode (@pxref{Minor Modes}). It is
-typically used in conjunction with Text mode (@pxref{Text Mode}), but
-you can also use it with other major modes such as Outline mode and
-Paragraph-Indent Text mode.
+ Enriched mode is a minor mode for editing formatted text files in a
+WYSIWYG (``what you see is what you get'') fashion. When Enriched
+mode is enabled, you can apply various formatting properties to the
+text in the buffer, such as fonts and colors; upon saving the buffer,
+those properties are saved together with the text, using the MIME
+@samp{text/enriched} file format.
-@cindex text/enriched MIME format
- Potentially, Emacs can store formatted text files in various file
-formats. Currently, only one format is implemented: @dfn{text/enriched}
-format, which is defined by the MIME protocol. @xref{Format
-Conversion,, Format Conversion, elisp, the Emacs Lisp Reference Manual},
-for details of how Emacs recognizes and converts file formats.
+ Enriched mode is typically used with Text mode (@pxref{Text Mode}).
+It is @emph{not} compatible with Font Lock mode, which is used by many
+major modes, including most programming language modes, for syntax
+highlighting (@pxref{Font Lock}). Unlike Enriched mode, Font Lock
+mode assigns text properties automatically, based on the current
+buffer contents; those properties are not saved to disk.
- The Emacs distribution contains a formatted text file that can serve as
-an example. Its name is @file{etc/enriched.doc}. It contains samples
-illustrating all the features described in this section. It also
-contains a list of ideas for future enhancements.
+ The file @file{etc/enriched.doc} in the Emacs distribution serves as
+an example of the features of Enriched mode.
@menu
-* Requesting Formatted Text:: Entering and exiting Enriched mode.
-* Hard and Soft Newlines:: There are two different kinds of newlines.
-* Editing Format Info:: How to edit text properties.
-* Faces: Format Faces. Bold, italic, underline, etc.
-* 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
- left or right margin, etc.
-* Special: Format Properties. The "special" text properties submenu.
-* Forcing Enriched Mode:: How to force use of Enriched mode.
+* Enriched Mode:: Entering and exiting Enriched mode.
+* Hard and Soft Newlines:: There are two different kinds of newlines.
+* Editing Format Info:: How to edit text properties.
+* Enriched Faces:: Bold, italic, underline, etc.
+* Enriched Indentation:: Changing the left and right margins.
+* Enriched Justification:: Centering, setting text flush with the
+ left or right margin, etc.
+* Enriched Properties:: The "special" text properties submenu.
@end menu
-@node Requesting Formatted Text
-@subsection Requesting to Edit Formatted Text
+@node Enriched Mode
+@subsection Enriched Mode
- Whenever you visit a file that Emacs saved in the text/enriched
-format, Emacs automatically converts the formatting information in the
-file into Emacs's own internal format (known as @dfn{text
-properties}), and turns on Enriched mode.
+ Enriched mode is a buffer-local minor mode (@pxref{Minor Modes}).
+When you visit a file that has been saved in the @samp{text/enriched}
+format, Emacs automatically enables Enriched mode, and applies the
+formatting information in the file to the buffer text. When you save
+a buffer with Enriched mode enabled, it is saved using the
+@samp{text/enriched} format, including the formatting information.
@findex enriched-mode
- To create a new file of formatted text, first visit the nonexistent
-file, then type @kbd{M-x enriched-mode} before you start inserting text.
-This command turns on Enriched mode. Do this before you begin inserting
-text, to ensure that the text you insert is handled properly.
-
- More generally, the command @code{enriched-mode} turns Enriched mode
-on if it was off, and off if it was on. With a prefix argument, this
-command turns Enriched mode on if the argument is positive, and turns
-the mode off otherwise.
-
- When you save a buffer while Enriched mode is enabled in it, Emacs
-automatically converts the text to text/enriched format while writing it
-into the file. When you visit the file again, Emacs will automatically
-recognize the format, reconvert the text, and turn on Enriched mode
-again.
+ To create a new file of formatted text, visit the nonexistent file
+and type @kbd{M-x enriched-mode}. This command actually toggles
+Enriched mode. With a prefix argument, it enables Enriched mode if
+the argument is positive, and disables Enriched mode otherwise. If
+you disable Enriched mode, Emacs no longer saves the buffer using the
+@samp{text/enriched} format; any formatting properties that have been
+added to the buffer remain in the buffer, but they are not saved to
+disk.
@vindex enriched-translations
- You can add annotations for saving additional text properties, which
-Emacs normally does not save, by adding to @code{enriched-translations}.
-Note that the text/enriched standard requires any non-standard
-annotations to have names starting with @samp{x-}, as in
-@samp{x-read-only}. This ensures that they will not conflict with
-standard annotations that may be added later.
-
- @xref{Text Properties,,, elisp, the Emacs Lisp Reference Manual},
-for more information about text properties.
+ Enriched mode does not save all Emacs text properties, only those
+specified in the variable @code{enriched-translations}. These include
+properties for fonts, colors, indentation, and justification.
+
+@findex format-decode-buffer
+ If you visit a file and Emacs fails to recognize that it is in the
+@samp{text/enriched} format, type @kbd{M-x format-decode-buffer}.
+This command prompts for a file format, and re-reads the file in that
+format. Specifying the @samp{text/enriched} format automatically
+enables Enriched mode.
+
+ To view a @samp{text/enriched} file in raw form (as plain text with
+markup tags rather than formatted text), use @kbd{M-x
+find-file-literally} (@pxref{Visiting}).
+
+ @xref{Format Conversion,, Format Conversion, elisp, the Emacs Lisp
+Reference Manual}, for details of how Emacs recognizes and converts
+file formats like @samp{text/enriched}. @xref{Text Properties,,,
+elisp, the Emacs Lisp Reference Manual}, for more information about
+text properties.
@node Hard and Soft Newlines
@subsection Hard and Soft Newlines
@@ -1903,56 +1911,44 @@ for more information about text properties.
@cindex newlines, hard and soft
@cindex use-hard-newlines
- In formatted text, Emacs distinguishes between two different kinds of
-newlines, @dfn{hard} newlines and @dfn{soft} newlines. (You can enable
-or disable this feature separately in any buffer with the command
-@code{use-hard-newlines}.)
-
- Hard newlines are used to separate paragraphs, or items in a list, or
-anywhere that there should always be a line break regardless of the
-margins. The @key{RET} command (@code{newline}) and @kbd{C-o}
-(@code{open-line}) insert hard newlines.
-
- Soft newlines are used to make text fit between the margins. All the
-fill commands, including Auto Fill, insert soft newlines---and they
-delete only soft newlines.
-
- Although hard and soft newlines look the same, it is important to bear
-the difference in mind. Do not use @key{RET} to break lines in the
-middle of filled paragraphs, or else you will get hard newlines that are
-barriers to further filling. Instead, let Auto Fill mode break lines,
-so that if the text or the margins change, Emacs can refill the lines
-properly. @xref{Auto Fill}.
-
- On the other hand, in tables and lists, where the lines should always
-remain as you type them, you can use @key{RET} to end lines. For these
-lines, you may also want to set the justification style to
-@code{unfilled}. @xref{Format Justification}.
+ In Enriched mode, Emacs distinguishes between two different kinds of
+newlines, @dfn{hard} newlines and @dfn{soft} newlines. You can also
+enable or disable this feature in other buffers, by typing @kbd{M-x
+use-hard-newlines}.
+
+ Hard newlines are used to separate paragraphs, or anywhere there
+needs to be a line break regardless of how the text is filled; soft
+newlines are used for filling. The @key{RET} (@code{newline}) and
+@kbd{C-o} (@code{open-line}) commands insert hard newlines. The fill
+commands, including Auto Fill (@pxref{Auto Fill}), insert only soft
+newlines and delete only soft newlines, leaving hard newlines alone.
+
+ Thus, when editing with Enriched mode, you should not use @key{RET}
+or @kbd{C-o} to break lines in the middle of filled paragraphs. Use
+Auto Fill mode or explicit fill commands (@pxref{Fill Commands})
+instead. Use @key{RET} or @kbd{C-o} where line breaks should always
+remain, such as in tables and lists. For such lines, you may also
+want to set the justification style to @code{unfilled}
+(@pxref{Enriched Justification}).
@node Editing Format Info
@subsection Editing Format Information
- There are two ways to alter the formatting information for a formatted
-text file: with keyboard commands, and with the mouse.
-
- The easiest way to add properties to your document is with the Text
-Properties menu. You can get to this menu in two ways: from the Edit
-menu in the menu bar (use @kbd{@key{F10} e t} if you have no mouse),
-or with @kbd{C-Mouse-2} (hold the @key{CTRL} key and press the middle
-mouse button). There are also keyboard commands described in the
-following section.
-
- These items in the Text Properties menu run commands directly:
+ The easiest way to alter properties is with the Text Properties
+menu. You can get to this menu from the Edit menu in the menu bar
+(@pxref{Menu Bar}), or with @kbd{C-Mouse-2} (@pxref{Menu Mouse
+Clicks}). Some of the commands in the Text Properties menu are listed
+below (you can also invoke them with @kbd{M-x}):
@table @code
@findex facemenu-remove-face-props
@item Remove Face Properties
-Delete from the region all face and color text properties
+Remove face properties from the region
(@code{facemenu-remove-face-props}).
@findex facemenu-remove-all
@item Remove Text Properties
-Delete @emph{all} text properties from the region
+Remove all text properties from the region, including face properties
(@code{facemenu-remove-all}).
@findex describe-text-properties
@@ -1961,168 +1957,98 @@ Delete @emph{all} text properties from the region
@cindex widgets at buffer position
@cindex buttons at buffer position
@item Describe Properties
-List all the text properties, widgets, buttons, and overlays of the
-character following point (@code{describe-text-properties}).
+List all text properties and other information about the character
+following point (@code{describe-text-properties}).
@item Display Faces
-Display a list of all the defined faces (@code{list-faces-display}).
+Display a list of defined faces (@code{list-faces-display}).
+@xref{Faces}.
@item Display Colors
-Display a list of all the defined colors (@code{list-colors-display}).
+Display a list of defined colors (@code{list-colors-display}).
+@xref{Colors}.
@end table
-@ifinfo
- Other items in the Text Properties menu lead to submenus:
-
-@menu
-* Faces: Format Faces. Bold, italic, underline, etc.
-* 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
- left or right margin, etc.
-* Special: Format Properties. The "special" text properties submenu.
-@end menu
-@end ifinfo
-@ifnotinfo
- The rest lead to submenus which are described in the following sections.
-@end ifnotinfo
-
-@node Format Faces
-@subsection Faces in Formatted Text
+@noindent
+The other menu entries are described in the following sections.
- The Faces submenu under Text Properties lists various Emacs faces
-including @code{bold}, @code{italic}, and @code{underline}
-(@pxref{Faces}). These menu items operate on the region if it is
-active and nonempty. Otherwise, they specify to use that face for an
-immediately following self-inserting character. There is also an item
-@samp{Other} with which you can enter a face name through the
-minibuffer (@pxref{Standard Faces}).
+@node Enriched Faces
+@subsection Faces in Enriched Text
- Instead of the Faces submenu, you can use these keyboard commands:
+ The following commands can be used to add or remove faces
+(@pxref{Faces}). Each applies to the text in the region if the mark
+is active, and to the next self-inserting character if the mark is
+inactive. With a prefix argument, each command applies to the next
+self-inserting character even if the region is active.
@table @kbd
@kindex M-o d @r{(Enriched mode)}
@findex facemenu-set-default
@item M-o d
-Remove all @code{face} properties from the region (which includes
-specified colors), or force the following inserted character to have no
-@code{face} property (@code{facemenu-set-default}).
+Remove all @code{face} properties (@code{facemenu-set-default}).
+
@kindex M-o b @r{(Enriched mode)}
@findex facemenu-set-bold
@item M-o b
-Add the face @code{bold} to the region or to the following inserted
-character (@code{facemenu-set-bold}).
+Apply the @code{bold} face (@code{facemenu-set-bold}).
+
@kindex M-o i @r{(Enriched mode)}
@findex facemenu-set-italic
@item M-o i
-Add the face @code{italic} to the region or to the following inserted
-character (@code{facemenu-set-italic}).
+Apply the @code{italic} face (@code{facemenu-set-italic}).
+
@kindex M-o l @r{(Enriched mode)}
@findex facemenu-set-bold-italic
@item M-o l
-Add the face @code{bold-italic} to the region or to the following
-inserted character (@code{facemenu-set-bold-italic}).
+Apply the @code{bold-italic} face (@code{facemenu-set-bold-italic}).
+
@kindex M-o u @r{(Enriched mode)}
@findex facemenu-set-underline
@item M-o u
-Add the face @code{underline} to the region or to the following inserted
-character (@code{facemenu-set-underline}).
+Apply the @code{underline} face (@code{facemenu-set-underline}).
+
@kindex M-o o @r{(Enriched mode)}
@findex facemenu-set-face
@item M-o o @var{face} @key{RET}
-Add the face @var{face} to the region or to the following inserted
-character (@code{facemenu-set-face}).
-@end table
+Apply the face @var{face} (@code{facemenu-set-face}).
- With a prefix argument, all these commands apply to an immediately
-following self-inserting character, disregarding the region.
+@findex facemenu-set-foreground
+@item M-x facemenu-set-foreground
+Prompt for a color (@pxref{Colors}), and apply it as a foreground
+color.
- A self-inserting character normally inherits the @code{face}
-property (and most other text properties) from the preceding character
-in the buffer. If you use the above commands to specify face for the
-next self-inserting character, or the next section's commands to
-specify a foreground or background color for it, then it does not
-inherit the @code{face} property from the preceding character; instead
-it uses whatever you specified. It will still inherit other text
-properties, though.
+@findex facemenu-set-background
+@item M-x facemenu-set-background
+Prompt for a color, and apply it as a background color.
+@end table
- Strictly speaking, these commands apply only to the first following
-self-inserting character that you type. But if you insert additional
-characters after it, they will inherit from the first one. So it
-appears that these commands apply to all of them.
+@noindent
+These command are also available via the Text Properties menu.
- Enriched mode defines two additional faces: @code{excerpt} and
-@code{fixed}. These correspond to codes used in the text/enriched file
-format.
-
- The @code{excerpt} face is intended for quotations. This face is the
-same as @code{italic} unless you customize it (@pxref{Face Customization}).
-
- The @code{fixed} face means, ``Use a fixed-width font for this part
-of the text.'' Applying the @code{fixed} face to a part of the text
-will cause that part of the text to appear in a fixed-width font, even
-if the default font is variable-width. This applies to Emacs and to
-other systems that display text/enriched format. So if you
-specifically want a certain part of the text to use a fixed-width
-font, you should specify the @code{fixed} face for that part.
-
- By default, the @code{fixed} face looks the same as @code{bold}.
-This is an attempt to distinguish it from @code{default}. You may
-wish to customize @code{fixed} to some other fixed-width medium font.
-@xref{Face Customization}.
-
- If your terminal cannot display different faces, you will not be
-able to see them, but you can still edit documents containing faces,
-and even add faces and colors to documents. The faces you specify
-will be visible when the file is viewed on a terminal that can display
-them.
-
-@node Format Colors
-@subsection Colors in Formatted Text
-
- You can specify foreground and background colors for portions of the
-text. Under Text Properties, there is a submenu for specifying the
-foreground color, and a submenu for specifying the background color.
-Each one lists all the colors that you have used in Enriched mode in
-the current Emacs session.
-
- If the region is active, the command applies to the text in the
-region; otherwise, it applies to any immediately following
-self-inserting input. When Transient Mark mode is off
-(@pxref{Disabled Transient Mark}), it always applies to the region
-unless a prefix argument is given, in which case it applies to the
-following input.
-
- Each of the two color submenus contains one additional item:
-@samp{Other}. You can use this item to specify a color that is not
-listed in the menu; it reads the color name with the minibuffer. To
-display a list of available colors and their names, use the
-@samp{Display Colors} menu item in the Text Properties menu
-(@pxref{Editing Format Info}).
-
- Any color that you specify in this way, or that is mentioned in a
-formatted text file that you read in, is added to the corresponding
-color menu for the duration of the Emacs session.
+ A self-inserting character normally inherits the face properties
+(and most other text properties) from the preceding character in the
+buffer. If you use one of the above commands to specify the face for
+the next self-inserting character, that character will not inherit the
+faces properties from the preceding character, but it will still
+inherit other text properties.
-@findex facemenu-set-foreground
-@findex facemenu-set-background
- There are no predefined key bindings for specifying colors, but you can do so
-with the extended commands @kbd{M-x facemenu-set-foreground} and
-@kbd{M-x facemenu-set-background}. Both of these commands read the name
-of the color with the minibuffer.
+ Enriched mode defines two additional faces: @code{excerpt} and
+@code{fixed}. These correspond to codes used in the text/enriched
+file format. The @code{excerpt} face is intended for quotations; by
+default, it appears the same as @code{italic}. The @code{fixed} face
+specifies fixed-width text; by default, it appears the same as
+@code{bold}.
-@node Format Indentation
-@subsection Indentation in Formatted Text
+@node Enriched Indentation
+@subsection Indentation in Enriched Text
- When editing formatted text, you can specify different amounts of
-indentation for the right or left margin of an entire paragraph or a
-part of a paragraph. The margins you specify automatically affect the
-Emacs fill commands (@pxref{Filling}) and line-breaking commands.
+ In Enriched mode, you can specify different amounts of indentation
+for the right or left margin of a paragraph or a part of a paragraph.
+These margins also affect fill commands such as @kbd{M-q}
+(@pxref{Filling}).
- The Indentation submenu of Text Properties provides a convenient
-interface for specifying these properties. The submenu contains four
-items:
+ The Indentation submenu of Text Properties provides four commands
+for specifying indentation:
@table @code
@kindex C-x TAB @r{(Enriched mode)}
@@ -2143,44 +2069,20 @@ Make the text narrower by indenting 4 columns at the right margin.
Remove 4 columns of indentation from the right margin.
@end table
- You can use these commands repeatedly to increase or decrease the
-indentation.
-
- The most common way to use them is to change the indentation of an
-entire paragraph. For other uses, the effects of refilling can be
-hard to predict, except in some special cases like the one described
-next.
-
- The most common other use is to format paragraphs with @dfn{hanging
-indents}, which means that the first line is indented less than
-subsequent lines. To set up a hanging indent, increase the
-indentation of the region starting after the first word of the
-paragraph and running until the end of the paragraph.
-
- Indenting the first line of a paragraph is easier. Set the margin for
-the whole paragraph where you want it to be for the body of the
-paragraph, then indent the first line by inserting extra spaces or tabs.
-
@vindex standard-indent
The variable @code{standard-indent} specifies how many columns these
commands should add to or subtract from the indentation. The default
-value is 4. The overall default right margin for Enriched mode is
-controlled by the variable @code{fill-column}, as usual.
+value is 4. The default right margin for Enriched mode is controlled
+by the variable @code{fill-column}, as usual.
@kindex C-c [ @r{(Enriched mode)}
@kindex C-c ] @r{(Enriched mode)}
@findex set-left-margin
@findex set-right-margin
- There are also two commands for setting the left or right margin of
-the region absolutely: @code{set-left-margin} and
-@code{set-right-margin}. Enriched mode binds these commands to
-@kbd{C-c [} and @kbd{C-c ]}, respectively. You can specify the
-margin width either with a numeric argument or in the minibuffer.
-
- Sometimes, as a result of editing, the filling of a paragraph becomes
-messed up---parts of the paragraph may extend past the left or right
-margins. When this happens, use @kbd{M-q} (@code{fill-paragraph}) to
-refill the paragraph.
+ You can also type @kbd{C-c [} (@code{set-left-margin}) and @kbd{C-c
+]} (@code{set-right-margin}) to set the left and right margins. You
+can specify the margin width with a numeric argument; otherwise these
+commands prompt for a value via the minibuffer.
The fill prefix, if any, works in addition to the specified paragraph
indentation: @kbd{C-x .} does not include the specified indentation's
@@ -2188,148 +2090,76 @@ whitespace in the new value for the fill prefix, and the fill commands
look for the fill prefix after the indentation on each line. @xref{Fill
Prefix}.
-@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.
+@node Enriched Justification
+@subsection Justification in Enriched Text
- The Justification submenu of Text Properties provides a convenient
-interface for specifying the style. The submenu contains five items:
-
-@table @code
-@item Left
-This is the most common style of justification (at least for English).
-Lines are aligned at the left margin but left uneven at the right.
-
-@item Right
-This aligns each line with the right margin. Spaces and tabs are added
-on the left, if necessary, to make lines line up on the right.
-
-@item Full
-This justifies the text, aligning both edges of each line. Justified
-text looks very nice in a printed book, where the spaces can all be
-adjusted equally, but it does not look as nice with a fixed-width font
-on the screen. Perhaps a future version of Emacs will be able to adjust
-the width of spaces in a line to achieve elegant justification.
-
-@item Center
-This centers every line between the current margins.
-
-@item Unfilled
-This turns off filling entirely. Each line will remain as you wrote it;
-the fill and auto-fill functions will have no effect on text which has
-this setting. You can, however, still indent the left margin. In
-unfilled regions, all newlines are treated as hard newlines (@pxref{Hard
-and Soft Newlines}) .
-@end table
-
- In Enriched mode, you can also specify justification from the keyboard
-using the @kbd{M-j} prefix character:
+ In Enriched mode, you can use the following commands to specify
+various @dfn{justification styles} for filling. These commands apply
+to the paragraph containing point, or, if the region is active, to all
+paragraphs overlapping the region.
@table @kbd
@kindex M-j l @r{(Enriched mode)}
@findex set-justification-left
@item M-j l
-Make the region left-filled (@code{set-justification-left}).
+Align lines to the left margin (@code{set-justification-left}).
+
@kindex M-j r @r{(Enriched mode)}
@findex set-justification-right
@item M-j r
-Make the region right-filled (@code{set-justification-right}).
+Align lines to the right margin (@code{set-justification-right}).
+
@kindex M-j b @r{(Enriched mode)}
@findex set-justification-full
@item M-j b
-Make the region fully justified (@code{set-justification-full}).
+Align lines to both margins, inserting spaces in the middle of the
+line to achieve this (@code{set-justification-full}).
+
@kindex M-j c @r{(Enriched mode)}
@kindex M-S @r{(Enriched mode)}
@findex set-justification-center
@item M-j c
@itemx M-S
-Make the region centered (@code{set-justification-center}).
+Center lines between the margins (@code{set-justification-center}).
+
@kindex M-j u @r{(Enriched mode)}
@findex set-justification-none
@item M-j u
-Make the region unfilled (@code{set-justification-none}).
+Turn off filling entirely (@code{set-justification-none}). The fill
+commands do nothing on text with this setting. You can, however,
+still indent the left margin.
@end table
- Justification styles apply to entire paragraphs. All the
-justification-changing commands operate on the paragraph containing
-point, or, if the region is active, on all paragraphs which overlap the
-region.
+ You can also specify justification styles using the Justification
+submenu in the Text Properties menu.
@vindex default-justification
- 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}.
-This is a per-buffer variable. Setting the variable directly affects
-only the current buffer. However, customizing it in a Custom buffer
-sets (as always) the default value for buffers that do not override it.
-@xref{Locals}, and @ref{Easy Customization}.
-
-@node Format Properties
-@subsection Setting Other Text Properties
-
- The Special Properties submenu of Text Properties can add or remove
-three other useful text properties: @code{read-only}, @code{invisible}
-and @code{intangible}. The @code{intangible} property disallows
-moving point within the text, the @code{invisible} text property hides
-text from display, and the @code{read-only} property disallows
-alteration of the text.
-
- Each of these special properties has a menu item to add it to the
-region. The last menu item, @samp{Remove Special}, removes all of these
-special properties from the text in the region.
-
- Currently, the @code{invisible} and @code{intangible} properties are
-@emph{not} saved in the text/enriched format. The @code{read-only}
-property is saved, but it is not a standard part of the text/enriched
-format, so other editors may not respect it.
-
-@node Forcing Enriched Mode
-@subsection Forcing Enriched Mode
+ The default justification style is specified by the per-buffer
+variable @code{default-justification}. Its value should be one of the
+symbols @code{left}, @code{right}, @code{full}, @code{center}, or
+@code{none}.
- Normally, Emacs knows when you are editing formatted text because it
-recognizes the special annotations used in the file that you visited.
-However, sometimes you must take special actions to convert file
-contents or turn on Enriched mode:
-
-@itemize @bullet
-@item
-When you visit a file that was created with some other editor, Emacs may
-not recognize the file as being in the text/enriched format. In this
-case, when you visit the file you will see the formatting commands
-rather than the formatted text. Type @kbd{M-x format-decode-buffer} to
-translate it. This also automatically turns on Enriched mode.
+@node Enriched Properties
+@subsection Setting Other Text Properties
-@item
-When you @emph{insert} a file into a buffer, rather than visiting it,
-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
+ The Special Properties submenu of Text Properties has entries for
+adding or removing three other text properties: @code{read-only},
+(which disallows alteration of the text), @code{invisible} (which
+hides text), and @code{intangible} (which disallows moving point
+within the text). The @samp{Remove Special} menu item removes all of
+these special properties from the text in the region.
- The command @code{format-decode-buffer} translates text in various
-formats into Emacs's internal format. It asks you to specify the format
-to translate from; however, normally you can type just @key{RET}, which
-tells Emacs to guess the format.
-
-@findex format-find-file
- If you wish to look at a text/enriched file in its raw form, as a
-sequence of characters rather than as formatted text, use the @kbd{M-x
-find-file-literally} command. This visits a file, like
-@code{find-file}, but does not do format conversion. It also inhibits
-character code conversion (@pxref{Coding Systems}) and automatic
-uncompression (@pxref{Compressed Files}). To disable format conversion
-but allow character code conversion and/or automatic uncompression if
-appropriate, use @code{format-find-file} with suitable arguments.
+ The @code{invisible} and @code{intangible} properties are @emph{not}
+saved in the text/enriched format. The @code{read-only} property is
+saved, but it is not a standard part of the text/enriched format, so
+other editors may not respect it.
@node Text Based Tables
@section Editing Text-based Tables
@cindex table mode
@cindex text-based tables
- Table mode provides an easy and intuitive way to create and edit WYSIWYG
+ Table mode provides an easy and intuitive way to create and edit
text-based tables. Here is an example of such a table:
@smallexample