Commit 8863a584 authored by Chong Yidong's avatar Chong Yidong
Browse files

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.
parent 6fdebe93
2011-12-03 Chong Yidong <cyd@gnu.org>
* 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.
2011-12-03 Eli Zaretskii <eliz@gnu.org>
* display.texi (Auto Scrolling): More accurate description of what
......
......@@ -69,7 +69,7 @@ arguments.)
* Environment:: Environment variables that Emacs uses.
* Display X:: Changing the default display and using remote login.
* Font X:: Choosing a font for text, under X.
* Colors:: Choosing display colors.
* Colors X:: Choosing display colors.
* Window Size X:: Start-up window size, under X.
* Borders X:: Internal and external borders, under X.
* Title X:: Specifying the initial frame's title.
......@@ -784,7 +784,7 @@ Use @var{font} as the default font.
When passing a font specification to Emacs on the command line, you
may need to ``quote'' it, by enclosing it in quotation marks, if it
contains characters that the shell treats specially (e.g. spaces).
contains characters that the shell treats specially (e.g.@: spaces).
For example:
@smallexample
......@@ -794,27 +794,14 @@ emacs -fn "DejaVu Sans Mono-12"
@xref{Fonts}, for other ways to specify the default font and font name
formats.
@node Colors
@node Colors X
@appendixsec Window Color Options
@cindex color of window, from command line
@cindex text colors, from command line
@findex list-colors-display
@cindex available colors
On a color display, you can specify which color to use for various
parts of the Emacs display. To find out what colors are available on
your system, type @kbd{M-x list-colors-display}, or press
@kbd{C-Mouse-2} and select @samp{Display Colors} from the pop-up menu.
(A particular window system might support many more colors, but the
list displayed by @code{list-colors-display} shows their portable
subset that can be safely used on any display supported by Emacs.)
If you do not specify colors, on windowed displays the default for the
background is white and the default for all other colors is black. On a
monochrome display, the foreground is black, the background is white,
and the border is gray if the display supports that. On terminals, the
background is usually black and the foreground is white.
Here is a list of the command-line options for specifying colors:
You can use the following command-line options to specify the colors
to use for various parts of the Emacs display. Colors may be
specified using either color names or RGB triplets (@pxref{Colors}).
@table @samp
@item -fg @var{color}
......@@ -822,15 +809,15 @@ background is usually black and the foreground is white.
@itemx --foreground-color=@var{color}
@opindex --foreground-color
@cindex foreground color, command-line argument
Specify the foreground color. @var{color} should be a standard color
name, or a numeric specification of the color's red, green, and blue
components as in @samp{#4682B4} or @samp{RGB:46/82/B4}.
Specify the foreground color, overriding the color specified by the
@code{default} face (@pxref{Faces}).
@item -bg @var{color}
@opindex -bg
@itemx --background-color=@var{color}
@opindex --background-color
@cindex background color, command-line argument
Specify the background color.
Specify the background color, overriding the color specified by the
@code{default} face.
@item -bd @var{color}
@opindex -bd
@itemx --border-color=@var{color}
......
......@@ -430,15 +430,8 @@ means that it's disabled. You can enable or disable the attribute by
clicking that button. When the attribute is enabled, you can change
the attribute value in the usual ways.
You can specify a color name (use @kbd{M-x list-colors-display} for
a list of them) or a hexadecimal color specification of the form
@samp{#@var{rr}@var{gg}@var{bb}}. (@samp{#000000} is black,
@samp{#ff0000} is red, @samp{#00ff00} is green, @samp{#0000ff} is
blue, and @samp{#ffffff} is white.) On a black-and-white display, the
colors you can use for the background are @samp{black}, @samp{white},
@samp{gray}, @samp{gray1}, and @samp{gray3}. Emacs supports these
shades of gray by using background stipple patterns instead of a
color.
The foreground and background colors can be specified using color
names or RGB triplets. @xref{Colors}.
Setting, saving and resetting a face work like the same operations for
variables (@pxref{Changing a Variable}).
......
......@@ -21,6 +21,7 @@ the text is displayed.
* View Mode:: Viewing read-only buffers.
* Follow Mode:: Follow mode lets two windows scroll as one.
* Faces:: How to change the display style using faces.
* Colors:: Specifying colors for faces.
* Standard Faces:: Emacs' predefined faces.
* Text Scale:: Increasing or decreasing text size in a buffer.
* Font Lock:: Minor mode for syntactic highlighting using faces.
......@@ -461,7 +462,7 @@ one large window.
To turn off Follow mode, type @kbd{M-x follow-mode} a second time.
@node Faces
@section Faces: Controlling Text Display Style
@section Text Faces
@cindex faces
Emacs can display text in several different styles, called
......@@ -480,10 +481,8 @@ matching that regular expression (@pxref{Regexps}).
It's possible for a given face to look different in different
frames. For instance, some text-only terminals do not support all
face attributes, particularly font, height, and width, and some
support a limited range of colors. The @code{list-faces-display}
command shows the appearance for the selected frame.
support a limited range of colors.
@cindex face colors, setting
@cindex background color
@cindex default face
You can customize a face to alter its appearance, and save those
......@@ -498,25 +497,58 @@ background color.
You can also use X resources to specify attributes of any particular
face. @xref{Resources}.
Emacs can display variable-width fonts, but some Emacs commands,
particularly indentation commands, do not account for variable
character display widths. Therefore, we recommend not using
variable-width fonts for most faces, particularly those assigned by
Font Lock mode.
@node Colors
@section Colors for Faces
@cindex color name
@cindex RGB triplet
Faces can have various foreground and background colors. When you
specify a color for a face---for instance, when customizing the face
(@pxref{Face Customization})---you can use either a @dfn{color name}
or an @dfn{RGB triplet}.
@findex list-colors-display
A color name is a pre-defined name, such as @samp{dark orange} or
@samp{medium sea green}. To view a list of color names, type @kbd{M-x
list-colors-display}. If you run this command on a graphical display,
it shows the full range of color names known to Emacs (these are the
standard X11 color names, defined in X's @file{rgb.txt} file). If you
run the command on a text-only terminal, it shows only a small subset
of colors that can be safely displayed on such terminals. However,
Emacs understands X11 color names even on text-only terminals; if a
face is given a color specified by an X11 color name, it is displayed
using the closest-matching terminal color.
An RGB triplet is a string of the form @samp{#RRGGBB}. Each of the
R, G, and B components is a hexadecimal number specifying the
component's relative intensity, one to four digits long (usually two
digits are used). The components must have the same number of digits.
For hexadecimal values A to F, either upper or lower case are
acceptable.
The @kbd{M-x list-colors-display} command also shows the equivalent
RGB triplet for each named color. For instance, @samp{medium sea
green} is equivalent to @samp{#3CB371}.
@cindex face colors, setting
@findex set-face-foreground
@findex set-face-background
You can also change the foreground and background colors of a face
with @kbd{M-x set-face-foreground} and @kbd{M-x set-face-background}.
These commands prompt in the minibuffer for a face name and a color
name, with completion, and then set that face to use the specified
color (@pxref{Face Customization}, for information about color names).
You can change the foreground and background colors of a face with
@kbd{M-x set-face-foreground} and @kbd{M-x set-face-background}.
These commands prompt in the minibuffer for a face name and a color,
with completion, and then set that face to use the specified color.
They affect the face colors on all frames, but their effects do not
persist for future Emacs sessions, unlike using the customization
buffer or X resources. You can also use frame parameters to set
foreground and background colors for a specific frame; see @ref{Frame
foreground and background colors for a specific frame; @xref{Frame
Parameters}.
Emacs can display variable-width fonts, but some Emacs commands,
particularly indentation commands, do not account for variable
character display widths. Therefore, we recommend not using
variable-width fonts for most faces, particularly those assigned by
Font Lock mode.
@node Standard Faces
@section Standard Faces
......@@ -1022,13 +1054,13 @@ trailing whitespace in the region instead.
@cindex fringes, and unused line indication
On graphical displays, Emacs can indicate unused lines at the end of
the window with a small image in the left fringe (@pxref{Fringes}).
The image appears for window lines that do not correspond to any
buffer text. Blank lines at the end of the buffer then stand out
because they do not have this image in the fringe. To enable this
feature, set the buffer-local variable @code{indicate-empty-lines} to
a non-@code{nil} value. You can enable or disable this feature for
all new buffers by setting the default value of this variable,
e.g.@:@code{(setq-default indicate-empty-lines t)}.
The image appears for screen lines that do not correspond to any
buffer text, so blank lines at the end of the buffer stand out because
they lack this image. To enable this feature, set the buffer-local
variable @code{indicate-empty-lines} to a non-@code{nil} value. You
can enable or disable this feature for all new buffers by setting the
default value of this variable, e.g.@: @code{(setq-default
indicate-empty-lines t)}.
@node Selective Display
@section Selective Display
......@@ -1257,7 +1289,7 @@ as octal escape sequences instead of caret escape sequences.
Some non-@acronym{ASCII} characters have the same appearance as an
@acronym{ASCII} space or hyphen (minus) character. Such characters
can cause problems if they are entered into a buffer without your
realization, e.g. by yanking; for instance, source code compilers
realization, e.g.@: by yanking; for instance, source code compilers
typically do not treat non-@acronym{ASCII} spaces as whitespace
characters. To deal with this problem, Emacs displays such characters
specially: it displays @code{U+00A0} (no-break space) with the
......
......@@ -113,25 +113,6 @@ Emacs Lisp Reference Manual}.
@insertcopying
@end ifnottex
@ignore
These subcategories have been deleted for simplicity
and to avoid conflicts.
Completion
Backup Files
Auto-Saving: Protection Against Disasters
Tags
Text Mode
Outline Mode
@TeX{} Mode
Formatted Text
Shell Command History
The ones for Dired and Rmail have had the items turned into :: items
to avoid conflicts.
Also Running Shell Commands from Emacs
and Sending Mail and Registers and Minibuffer.
@end ignore
@menu
* Distrib:: How to get the latest Emacs distribution.
* Intro:: An introduction to Emacs concepts.
......@@ -350,6 +331,7 @@ Controlling the Display
* View Mode:: Viewing read-only buffers.
* Follow Mode:: Follow mode lets two windows scroll as one.
* Faces:: How to change the display style using faces.
* Colors:: Specifying colors for faces.
* Standard Faces:: Emacs' predefined faces.
* Text Scale:: Increasing or decreasing text size in a buffer.
* Font Lock:: Minor mode for syntactic highlighting using faces.
......@@ -569,8 +551,8 @@ Commands for Human Languages
* 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.
Filling Text
......@@ -597,18 +579,16 @@ Outline Mode
* TeX Print:: Commands for printing part of a file with TeX.
* TeX Misc:: Customization of TeX mode, and related features.
Editing Formatted Text
Editing Enriched Text
* 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.
* Format Faces:: Bold, italic, underline, etc.
* Format Colors:: Changing the color of text.
* Format Indentation:: Changing the left and right margins.
* Format Justification:: Centering, setting text flush with the
left or right margin, etc.
* 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.
@c The automatic texinfo menu update inserts some duplicate items here
@c (faces, colors, indentation, justification, properties), because
......@@ -1150,7 +1130,7 @@ Command Line Arguments for Emacs Invocation
* Environment:: Environment variables that Emacs uses.
* Display X:: Changing the default display and using remote login.
* Font X:: Choosing a font for text, under X.
* Colors:: Choosing display colors.
* Colors X:: Choosing display colors.
* Window Size X:: Start-up window size, under X.
* Borders X:: Internal and external borders, under X.
* Title X:: Specifying the initial frame's title.
......
......@@ -297,8 +297,9 @@ original encoding and end-of-line convention. @xref{Coding Systems}.
If you wish to edit a file as a sequence of @acronym{ASCII}
characters with no special encoding or conversion, use the @kbd{M-x
find-file-literally} command. This visits a file, like @kbd{C-x C-f},
but does not do format conversion (@pxref{Formatted Text}), character
code conversion (@pxref{Coding Systems}), or automatic uncompression
but does not do format conversion (@pxref{Format Conversion,, Format
Conversion, elisp, the Emacs Lisp Reference Manual}), character code
conversion (@pxref{Coding Systems}), or automatic uncompression
(@pxref{Compressed Files}), and does not add a final newline because
of @code{require-final-newline} (@pxref{Customize Save}). If you have
already visited the same file in the usual (non-literal) manner, this
......
......@@ -6,7 +6,7 @@
@chapter Frames and Graphical Displays
@cindex frames
When Emacs is started on a graphical display, e.g. on the X Window
When Emacs is started on a graphical display, e.g.@: on the X Window
System, it occupies a graphical system-level ``window''. In this
manual, we call this a @dfn{frame}, reserving the word ``window'' for
the part of the frame used for displaying a buffer. A frame initially
......@@ -245,8 +245,8 @@ Select the text you drag across, in the form of whole lines.
@vindex mouse-highlight
Some Emacs buffers include @dfn{buttons}, or @dfn{hyperlinks}:
pieces of text that perform some action (e.g. following a reference)
when activated (e.g. by clicking on them). Usually, a button's text
pieces of text that perform some action (e.g.@: following a reference)
when activated (e.g.@: by clicking on them). Usually, a button's text
is visually highlighted: it is underlined, or a box is drawn around
it. If you move the mouse over a button, the shape of the mouse
cursor changes and the button lights up. If you change the variable
......@@ -302,8 +302,9 @@ menu smarter and more customizable. @xref{Buffer Menus}.
@item C-Mouse-2
@kindex C-Mouse-2
This menu is for specifying faces and other text properties
for editing formatted text. @xref{Formatted Text}.
This menu contains entries for examining faces and other text
properties, and well as for setting them (the latter is mainly useful
when editing enriched text; @pxref{Enriched Text}).
@item C-Mouse-3
@kindex C-Mouse-3
......@@ -657,7 +658,7 @@ The entries have the following meanings:
@item maker
The name of the font manufacturer.
@item family
The name of the font family (e.g. @samp{courier}).
The name of the font family (e.g.@: @samp{courier}).
@item weight
The font weight---normally either @samp{bold}, @samp{medium} or
@samp{light}. Some font names support other values.
......
......@@ -509,11 +509,6 @@ character sets and which font to use to display each of them. Fontsets
make it easy to change several fonts at once by specifying the name of a
fontset, rather than changing each font separately. @xref{Fontsets}.
@item Formatted Text
Formatted text is text that displays with formatting information while
you edit. Formatting information includes fonts, colors, and specified
margins. @xref{Formatted Text}.
@item Formfeed Character
See `page.'
......@@ -702,9 +697,8 @@ that someone else is already editing.
See `incremental search.'
@item Justification
Justification means adding extra spaces within lines of text
in order to adjust the position of the text edges.
@xref{Format Justification}.
Justification means adding extra spaces within lines of text in order
to adjust the position of the text edges. @xref{Fill Commands}.
@item Key Binding
See `binding.'
......@@ -1362,12 +1356,6 @@ See `abbrev.'
Word search is searching for a sequence of words, considering the
punctuation between them as insignificant. @xref{Word Search}.
@item WYSIWYG
WYSIWYG stands for ``What you see is what you get.'' Emacs generally
provides WYSIWYG editing for files of characters; in Enriched mode
(@pxref{Formatted Text}), it provides WYSIWYG editing for files that
include text formatting information.
@item Yanking
Yanking means reinserting text previously killed (q.v.@:). It can be
used to undo a mistaken kill, or for copying or moving text. Some
......
......@@ -202,7 +202,7 @@ amount of work you can lose in case of a crash. @xref{Auto Save}.
@item
Enriched mode enables editing and saving of formatted text.
@xref{Formatted Text}.
@xref{Enriched Text}.
@item
Flyspell mode automatically highlights misspelled words.
......
This diff is collapsed.
......@@ -306,14 +306,14 @@ Name to display in the title bar of the initial Emacs frame.
@item @code{toolBar} (class @code{ToolBar})
@cindex tool bar
Number of lines to reserve for the tool bar. A zero value suppresses
the tool bar. For the Emacs tool bar (i.e. not Gtk+), if the value is
non-zero and @code{auto-resize-tool-bars} is non-@code{nil}, the tool bar's
size will be changed automatically so that all tool bar items are visible.
If the value of @code{auto-resize-tool-bars} is @code{grow-only},
the tool bar expands automatically, but does not contract automatically.
To contract the tool bar, you must redraw the frame by entering @kbd{C-l}.
For the Gtk+ tool bar, any non-zero value means on and
@code{auto-resize-tool-bars} has no effect.
the tool bar. For the Emacs tool bar (i.e.@: not Gtk+), if the value
is non-zero and @code{auto-resize-tool-bars} is non-@code{nil}, the
tool bar's size will be changed automatically so that all tool bar
items are visible. If the value of @code{auto-resize-tool-bars} is
@code{grow-only}, the tool bar expands automatically, but does not
contract automatically. To contract the tool bar, you must redraw the
frame by entering @kbd{C-l}. For the Gtk+ tool bar, any non-zero
value means on and @code{auto-resize-tool-bars} has no effect.
@item @code{useXIM} (class @code{UseXIM})
@cindex XIM
......@@ -641,17 +641,18 @@ The color for the border shadow, on the top and the left.
@node GTK resources
@appendixsec GTK resources
@iftex
The most common way to customize the GTK widgets Emacs uses (menus, dialogs
tool bars and scroll bars) is by choosing an appropriate theme, for example
with the GNOME theme selector.
You can also do Emacs specific customization
by inserting GTK style directives in the file @file{~/.emacs.d/gtkrc},
but only if you have a Gtk+ version earlier than 3 (i.e. 2). Some GTK
themes ignore customizations in @file{~/.emacs.d/gtkrc} so not everything
works with all themes. To customize Emacs font, background, faces, etc., use
the normal X resources (@pxref{Resources}). We will present some examples of
customizations here, but for a more detailed description, see the online manual
The most common way to customize the GTK widgets Emacs uses (menus,
dialogs tool bars and scroll bars) is by choosing an appropriate
theme, for example with the GNOME theme selector.
You can also do Emacs specific customization by inserting GTK style
directives in the file @file{~/.emacs.d/gtkrc}, but only if you have a
Gtk+ version earlier than 3 (i.e.@: 2). Some GTK themes ignore
customizations in @file{~/.emacs.d/gtkrc} so not everything works with
all themes. To customize Emacs font, background, faces, etc., use the
normal X resources (@pxref{Resources}). We will present some examples
of customizations here, but for a more detailed description, see the
online manual
The first example is just one line. It changes the font on all GTK widgets
to courier with size 12:
......@@ -1065,7 +1066,7 @@ possible states are:
This is the default state for widgets.
@item ACTIVE
This is the state for a widget that is ready to do something. It is
also for the trough of a scroll bar, i.e. @code{bg[ACTIVE] = "red"}
also for the trough of a scroll bar, i.e.@: @code{bg[ACTIVE] = "red"}
sets the scroll bar trough to red. Buttons that have been pressed but
not released yet (``armed'') are in this state.
@item PRELIGHT
......@@ -1109,7 +1110,7 @@ You can't specify the file by its absolute file name. GTK looks for
the pixmap file in directories specified in @code{pixmap_path}.
@code{pixmap_path} is a colon-separated list of directories within
double quotes, specified at the top level in a @file{gtkrc} file
(i.e. not inside a style definition; see example above):
(i.e.@: not inside a style definition; see example above):
@smallexample
pixmap_path "/usr/share/pixmaps:/usr/include/X11/pixmaps"
......@@ -1131,19 +1132,18 @@ Bold 12}, @samp{Courier 14}, @samp{Times 18}. See below for exact
syntax. The names are case insensitive.
@end table
There are three ways to specify a color: by name, in hexadecimal
form, and with an RGB triplet.
There are three ways to specify a color: a color name, an RGB
triplet, or a GTK-style RGB triplet. @xref{Colors}, for a description
of color names and RGB triplets. Color names should be enclosed with
double quotes, e.g.@: @samp{"red"}. RGB triplets should be written
without double quotes, e.g.@: @samp{#ff0000}. GTK-style RGB triplets
have the form
@noindent
A color name is written within double quotes, for example @code{"red"}.
@noindent
Hexadecimal form is the same as in X:
@code{#@var{rrrr}@var{gggg}@var{bbbb}}, where all three color specs
must have the same number of hex digits (1, 2, 3 or 4).
@smallexample
@code{@{ @var{r}, @var{g}, @var{b} @}}
@end smallexample
@noindent
An RGB triplet looks like @code{@{ @var{r}, @var{g}, @var{b} @}},
where @var{r}, @var{g} and @var{b} are either integers in the range
0-65535 or floats in the range 0.0-1.0.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment