]> code.delx.au - gnu-emacs/blobdiff - doc/lispref/display.texi
Improve indexing on the chapter/section/subsection levels.
[gnu-emacs] / doc / lispref / display.texi
index a70580c7f22c75d85f45b8532a4025f12aa7227a..5d3202e67efc816b5b3cc20ae39cb8434327cdaa 100644 (file)
@@ -1,6 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990-1995, 1998-2013 Free Software Foundation, Inc.
+@c Copyright (C) 1990-1995, 1998-2014 Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @node Display
 @chapter Emacs Display
@@ -18,12 +18,13 @@ that Emacs presents to the user.
 * Selective Display::   Hiding part of the buffer text (the old way).
 * Temporary Displays::  Displays that go away automatically.
 * Overlays::            Use overlays to highlight parts of the buffer.
-* Width::               How wide a character or string is on the screen.
+* Size of Displayed Text::  How large displayed text is.
 * Line Height::         Controlling the height of lines.
 * Faces::               A face defines a graphics style for text characters:
                           font, colors, etc.
 * Fringes::             Controlling window fringes.
 * Scroll Bars::         Controlling vertical scroll bars.
+* Window Dividers::     Separating windows visually.
 * Display Property::    Enabling special display features.
 * Images::              Displaying images in Emacs buffers.
 * Buttons::             Adding clickable buttons to Emacs buffers.
@@ -38,6 +39,8 @@ that Emacs presents to the user.
 
 @node Refresh Screen
 @section Refreshing the Screen
+@cindex refresh the screen
+@cindex screen refresh
 
   The function @code{redraw-frame} clears and redisplays the entire
 contents of a given frame (@pxref{Frames}).  This is useful if the
@@ -84,10 +87,7 @@ waiting for input.
 @defun redisplay &optional force
 This function tries immediately to redisplay.  The optional argument
 @var{force}, if non-@code{nil}, forces the redisplay to be performed,
-instead of being preempted, even if input is pending and the variable
-@code{redisplay-dont-pause} is @code{nil} (see below).  If
-@code{redisplay-dont-pause} is non-@code{nil} (the default), this
-function redisplays in any case, i.e., @var{force} does nothing.
+instead of being preempted if input is pending.
 
 The function returns @code{t} if it actually tried to redisplay, and
 @code{nil} otherwise.  A value of @code{t} does not mean that
@@ -95,26 +95,9 @@ redisplay proceeded to completion; it could have been preempted by
 newly arriving input.
 @end defun
 
-@defvar redisplay-dont-pause
-If this variable is @code{nil}, arriving input events preempt
-redisplay; Emacs avoids starting a redisplay, and stops any redisplay
-that is in progress, until the input has been processed.  In
-particular, @code{(redisplay)} returns @code{nil} without actually
-redisplaying, if there is pending input.
-
-The default value is @code{t}, which means that pending input does not
-preempt redisplay.
-@end defvar
-
-@defvar redisplay-preemption-period
-If @code{redisplay-dont-pause} is @code{nil}, this variable specifies
-how many seconds Emacs waits between checks for new input during
-redisplay; if input arrives during this interval, redisplay stops and
-the input is processed.  The default value is 0.1; if the value is
-@code{nil}, Emacs does not check for input during redisplay.
-
-This variable has no effect when @code{redisplay-dont-pause} is
-non-@code{nil} (the default).
+@defvar pre-redisplay-function
+A function run just before redisplay.  It is called with one argument,
+the set of windows to redisplay.
 @end defvar
 
   Although @code{redisplay} tries immediately to redisplay, it does
@@ -214,22 +197,21 @@ A line prefix may also be specified for regions of text using the
 over the @code{line-prefix} variable.  @xref{Special Properties}.
 @end defvar
 
-  If your buffer contains @emph{very} long lines, and you use
-continuation to display them, computing the continuation lines can
-make redisplay slow.  The column computation and indentation functions
-also become slow.  Then you might find it advisable to set
-@code{cache-long-scans} to @code{t}.
+@ignore
+  If your buffer contains only very short lines, you might find it
+advisable to set @code{cache-long-scans} to @code{nil}.
 
 @defvar cache-long-scans
-If this variable is non-@code{nil}, various indentation and motion
-functions, and Emacs redisplay, cache the results of scanning the
-buffer, and consult the cache to avoid rescanning regions of the buffer
-unless they are modified.
+If this variable is non-@code{nil} (the default), various indentation
+and motion functions, and Emacs redisplay, cache the results of
+scanning the buffer, and consult the cache to avoid rescanning regions
+of the buffer unless they are modified.
 
-Turning on the cache slows down processing of short lines somewhat.
+Turning off the cache speeds up processing of short lines somewhat.
 
 This variable is automatically buffer-local in every buffer.
 @end defvar
+@end ignore
 
 @node The Echo Area
 @section The Echo Area
@@ -442,7 +424,7 @@ that it prints a message in the echo area unconditionally.
 
 The first two arguments have the same meaning as for
 @code{progress-reporter-update}.  Optional @var{new-message} allows
-you to change the message of the @var{reporter}.  Since this functions
+you to change the message of the @var{reporter}.  Since this function
 always updates the echo area, such a change will be immediately
 presented to the user.
 @end defun
@@ -481,7 +463,17 @@ this macro this way:
   Almost all the messages displayed in the echo area are also recorded
 in the @file{*Messages*} buffer so that the user can refer back to
 them.  This includes all the messages that are output with
-@code{message}.
+@code{message}.  By default, this buffer is read-only and uses the major
+mode @code{messages-buffer-mode}.  Nothing prevents the user from
+killing the @file{*Messages*} buffer, but the next display of a message
+recreates it.  Any Lisp code that needs to access the
+@file{*Messages*} buffer directly and wants to ensure that it exists
+should use the function @code{messages-buffer}.
+
+@defun messages-buffer
+This function returns the @file{*Messages*} buffer.  If it does not
+exist, it creates it, and switches it to @code{messages-buffer-mode}.
+@end defun
 
 @defopt message-log-max
 This variable specifies how many lines to keep in the @file{*Messages*}
@@ -519,6 +511,7 @@ are logged that share a common prefix ending in @samp{...}.
 
 @node Echo Area Customization
 @subsection Echo Area Customization
+@cindex echo area customization
 
   These variables control details of how the echo area works.
 
@@ -539,8 +532,7 @@ This normal hook is run whenever the echo area is cleared---either by
 
 @defopt echo-keystrokes
 This variable determines how much time should elapse before command
-characters echo.  Its value must be an integer or floating point number,
-which specifies the
+characters echo.  Its value must be a number, and specifies the
 number of seconds to wait before echoing.  If the user types a prefix
 key (such as @kbd{C-x}) and then delays this many seconds before
 continuing, the prefix key is echoed in the echo area.  (Once echoing
@@ -611,8 +603,8 @@ program signals a Lisp error and then handles it with
 @code{condition-case}, the user won't see the error message; it could
 show the message to the user by reporting it as a warning.)
 
-@c FIXME: Why use ‘(bytecomp)’ instead of ‘'bytecomp’ or simply
-@c ‘bytecomp’ here?  The parens are part of ‘warning-type-format’ but
+@c FIXME: Why use "(bytecomp)" instead of "'bytecomp" or simply
+@c "bytecomp" here?  The parens are part of warning-type-format but
 @c not part of the warning type. --xfq
 @cindex warning type
   Each warning has a @dfn{warning type} to classify it.  The type is a
@@ -647,6 +639,7 @@ specify a specific warning type.
 
 @node Warning Variables
 @subsection Warning Variables
+@cindex warning variables
 
   Programs can customize how their warnings appear by binding
 the variables described in this section.
@@ -724,6 +717,7 @@ all.
 
 @node Warning Options
 @subsection Warning Options
+@cindex warning options
 
   These variables are used by users to control what happens
 when a Lisp program reports a warning.
@@ -757,6 +751,7 @@ that warning is not logged.
 
 @node Delayed Warnings
 @subsection Delayed Warnings
+@cindex delayed warnings
 
 Sometimes, you may wish to avoid showing a warning while a command is
 running, and only show it only after the end of the command.  You can
@@ -916,12 +911,14 @@ current value of @code{buffer-invisibility-spec}.
 
 @vindex line-move-ignore-invisible
   Ordinarily, functions that operate on text or move point do not care
-whether the text is invisible.  The user-level line motion commands
-ignore invisible newlines if @code{line-move-ignore-invisible} is
-non-@code{nil} (the default), but only because they are explicitly
-programmed to do so.
-
-  However, if a command ends with point inside or at the boundary of
+whether the text is invisible, they process invisible characters and
+visible characters alike.  The user-level line motion commands,
+such as @code{next-line}, @code{previous-line}, ignore invisible
+newlines if @code{line-move-ignore-invisible} is non-@code{nil} (the
+default), i.e., behave like these invisible newlines didn't exist in
+the buffer, but only because they are explicitly programmed to do so.
+
+  If a command ends with point inside or at the boundary of
 invisible text, the main editing loop relocates point to one of the
 two ends of the invisible text.  Emacs chooses the direction of
 relocation so that it is the same as the overall movement direction of
@@ -938,6 +935,10 @@ command moved point forward into an invisible range, Emacs moves point forward
 to the first visible character that follows the invisible text and then forward
 one more character.
 
+  These @dfn{adjustments} of point that ended up in the middle of
+invisible text can be disabled by setting @code{disable-point-adjustment}
+to a non-@code{nil} value.  @xref{Adjusting Point}.
+
   Incremental search can make invisible overlays visible temporarily
 and/or permanently when a match includes invisible text.  To enable
 this, the overlay should have a non-@code{nil}
@@ -1074,34 +1075,36 @@ You can use a display table to substitute other text for the ellipsis
 
 @node Temporary Displays
 @section Temporary Displays
+@cindex temporary display
+@cindex temporary buffer display
 
   Temporary displays are used by Lisp programs to put output into a
 buffer and then present it to the user for perusal rather than for
 editing.  Many help commands use this feature.
 
-@defmac with-output-to-temp-buffer buffer-name forms@dots{}
-This function executes @var{forms} while arranging to insert any output
-they print into the buffer named @var{buffer-name}, which is first
-created if necessary, and put into Help mode.  Finally, the buffer is
-displayed in some window, but not selected.  (See the similar
-form @code{with-temp-buffer-window} below.)
-
-If the @var{forms} do not change the major mode in the output buffer,
-so that it is still Help mode at the end of their execution, then
-@code{with-output-to-temp-buffer} makes this buffer read-only at the
-end, and also scans it for function and variable names to make them
-into clickable cross-references.  @xref{Docstring hyperlinks, , Tips
-for Documentation Strings}, in particular the item on hyperlinks in
+@defmac with-output-to-temp-buffer buffer-name body@dots{}
+This function executes the forms in @var{body} while arranging to insert
+any output they print into the buffer named @var{buffer-name}, which is
+first created if necessary, and put into Help mode.  (See the similar
+form @code{with-temp-buffer-window} below.)  Finally, the buffer is
+displayed in some window, but that window is not selected.
+
+If the forms in @var{body} do not change the major mode in the output
+buffer, so that it is still Help mode at the end of their execution,
+then @code{with-output-to-temp-buffer} makes this buffer read-only at
+the end, and also scans it for function and variable names to make them
+into clickable cross-references.  @xref{Docstring hyperlinks, , Tips for
+Documentation Strings}, in particular the item on hyperlinks in
 documentation strings, for more details.
 
-The string @var{buffer-name} specifies the temporary buffer, which
-need not already exist.  The argument must be a string, not a buffer.
-The buffer is erased initially (with no questions asked), and it is
-marked as unmodified after @code{with-output-to-temp-buffer} exits.
+The string @var{buffer-name} specifies the temporary buffer, which need
+not already exist.  The argument must be a string, not a buffer.  The
+buffer is erased initially (with no questions asked), and it is marked
+as unmodified after @code{with-output-to-temp-buffer} exits.
 
 @code{with-output-to-temp-buffer} binds @code{standard-output} to the
-temporary buffer, then it evaluates the forms in @var{forms}.  Output
-using the Lisp output functions within @var{forms} goes by default to
+temporary buffer, then it evaluates the forms in @var{body}.  Output
+using the Lisp output functions within @var{body} goes by default to
 that buffer (but screen display and messages in the echo area, although
 they are ``output'' in the general sense of the word, are not affected).
 @xref{Output Functions}.
@@ -1109,7 +1112,7 @@ they are ``output'' in the general sense of the word, are not affected).
 Several hooks are available for customizing the behavior
 of this construct; they are listed below.
 
-The value of the last form in @var{forms} is returned.
+The value of the last form in @var{body} is returned.
 
 @example
 @group
@@ -1159,29 +1162,34 @@ displaying the temporary buffer.  When the hook runs, the temporary buffer
 is current, and the window it was displayed in is selected.
 @end defvar
 
-@defmac with-temp-buffer-window buffer-or-name action quit-function forms@dots{}
-This macro is similar to @code{with-output-to-temp-buffer}.
-Like that construct, it executes @var{forms} while arranging to insert
-any output they print into the buffer named @var{buffer-or-name}.
-Finally, the buffer is displayed in some window, but not selected.
-Unlike @code{with-output-to-temp-buffer}, this does not switch to Help
-mode.
-
-The argument @var{buffer-or-name} specifies the temporary buffer.
-It can be either a buffer, which must already exist, or a string,
-in which case a buffer of that name is created if necessary.
-The buffer is marked as unmodified and read-only when
-@code{with-temp-buffer-window} exits.
+@defmac with-temp-buffer-window buffer-or-name action quit-function body@dots{}
+This macro is similar to @code{with-output-to-temp-buffer}.  Like that
+construct, it executes @var{body} while arranging to insert any output
+it prints into the buffer named @var{buffer-or-name} and displays that
+buffer in some window.  Unlike @code{with-output-to-temp-buffer},
+however, it does not automatically switch that buffer to Help mode.
+
+Like @code{with-output-to-temp-buffer} it neither makes the buffer
+specified by @var{buffer-or-name} current when executing @var{body}.
+@findex with-current-buffer-window
+The otherwise identical macro @code{with-current-buffer-window} can be
+used to execute @var{body} with that buffer current.
+
+The argument @var{buffer-or-name} specifies the temporary buffer.  It
+can be either a buffer, which must already exist, or a string, in which
+case a buffer of that name is created, if necessary.  The buffer is
+marked as unmodified and read-only when @code{with-temp-buffer-window}
+exits.
 
 This macro does not call @code{temp-buffer-show-function}.  Rather, it
 passes the @var{action} argument to @code{display-buffer} in order to
 display the buffer.
 
-The value of the last form in @var{forms} is returned, unless the
-argument @var{quit-function} is specified.  In that case,
-it is called with two arguments: the window showing the buffer
-and the result of @var{forms}.  The final return value is then
-whatever @var{quit-function} returns.
+The value of the last form in @var{body} is returned, unless the
+argument @var{quit-function} is specified.  In that case, it is called
+with two arguments: the window showing the buffer and the result of
+@var{body}.  The final return value is then whatever
+@var{quit-function} returns.
 
 @vindex temp-buffer-window-setup-hook
 @vindex temp-buffer-window-show-hook
@@ -1280,6 +1288,8 @@ inside the overlay or outside, and likewise for the end of the overlay.
 
 @node Managing Overlays
 @subsection Managing Overlays
+@cindex managing overlays
+@cindex overlays, managing
 
   This section describes the functions to create, delete and move
 overlays, and to examine their contents.  Overlay changes are not
@@ -1440,6 +1450,7 @@ faster if you do @code{(overlay-recenter (point-max))} first.
 
 @node Overlay Properties
 @subsection Overlay Properties
+@cindex overlay properties
 
   Overlay properties are like text properties in that the properties that
 alter how a character is displayed can come from either source.  But in
@@ -1456,8 +1467,10 @@ the buffer's undo list.
 
   Since more than one overlay can specify a property value for the
 same character, Emacs lets you specify a priority value of each
-overlay.  You should not make assumptions about which overlay will
-prevail when there is a conflict and they have the same priority.
+overlay.  In case two overlays have the same priority value, and one
+is nested in the other, then the inner one will have priority over the
+outer one.  If neither is nested in the other then you should not make
+assumptions about which overlay will prevail.
 
   These functions read and set the properties of an overlay:
 
@@ -1488,9 +1501,9 @@ of them:
 @table @code
 @item priority
 @kindex priority @r{(overlay property)}
-This property's value (which should be a non-negative integer number)
-determines the priority of the overlay.  No priority, or @code{nil},
-means zero.
+This property's value determines the priority of the overlay.
+If you want to specify a priority value, use either @code{nil}
+(or zero), or a positive integer.  Any other value has undefined behavior.
 
 The priority matters when two or more overlays cover the same
 character and both specify the same property; the one whose
@@ -1500,9 +1513,13 @@ completely override the other value; instead, its face attributes
 override the face attributes of the lower priority @code{face}
 property.
 
-Currently, all overlays take priority over text properties.  Please
-avoid using negative priority values, as we have not yet decided just
-what they should mean.
+Currently, all overlays take priority over text properties.
+
+Note that Emacs sometimes uses non-numeric priority values for some of
+its internal overlays, so do not try to do arithmetic on the
+priority of an overlay (unless it is one that you created).  If you
+need to put overlays in priority order, use the @var{sorted} argument
+of @code{overlays-at}.  @xref{Finding Overlays}.
 
 @item window
 @kindex window @r{(overlay property)}
@@ -1686,12 +1703,15 @@ Properties}.
 
 @node Finding Overlays
 @subsection Searching for Overlays
+@cindex searching for overlays
+@cindex overlays, searching for
 
-@defun overlays-at pos
-This function returns a list of all the overlays that cover the
-character at position @var{pos} in the current buffer.  The list is in
-no particular order.  An overlay contains position @var{pos} if it
-begins at or before @var{pos}, and ends after @var{pos}.
+@defun overlays-at pos &optional sorted
+This function returns a list of all the overlays that cover the character at
+position @var{pos} in the current buffer.  If @var{sorted} is non-@code{nil},
+the list is in decreasing order of priority, otherwise it is in no particular
+order.  An overlay contains position @var{pos} if it begins at or before
+@var{pos}, and ends after @var{pos}.
 
 To illustrate usage, here is a Lisp function that returns a list of the
 overlays that specify property @var{prop} for the character at point:
@@ -1750,8 +1770,10 @@ changes.
     (point)))
 @end smallexample
 
-@node Width
-@section Width
+@node Size of Displayed Text
+@section Size of Displayed Text
+@cindex size of text on display
+@cindex character width on display
 
 Since not all characters have the same width, these functions let you
 check the width of a character.  @xref{Primitive Indent}, and
@@ -1808,6 +1830,54 @@ to or less than the display width of @var{ellipsis}.  If
 @end example
 @end defun
 
+The following function returns the size in pixels of text as if it were
+displayed in a given window.  This function is used by
+@code{fit-window-to-buffer} (@pxref{Resizing Windows}) and
+@code{fit-frame-to-buffer} (@pxref{Size and Position}) to make a window
+exactly as large as the text it contains.
+
+@defun window-text-pixel-size &optional window from to x-limit y-limit mode-and-header-line
+This function returns the size of the text of @var{window}'s buffer in
+pixels.  @var{window} must be a live window and defaults to the selected
+one.  The return value is a cons of the maximum pixel-width of any text
+line and the maximum pixel-height of all text lines.
+
+The optional argument @var{from}, if non-@code{nil}, specifies the first
+text position to consider and defaults to the minimum accessible
+position of the buffer.  If @var{from} is @code{t}, it uses the minimum
+accessible position that is not a newline character.  The optional
+argument @var{to}, if non-@code{nil}, specifies the last text position
+to consider and defaults to the maximum accessible position of the
+buffer.  If @var{to} is @code{t}, it uses the maximum accessible
+position that is not a newline character.
+
+The optional argument @var{x-limit}, if non-@code{nil}, specifies the
+maximum pixel-width that can be returned.  @var{x-limit} @code{nil} or
+omitted, means to use the pixel-width of @var{window}'s body
+(@pxref{Window Sizes}); this is useful when the caller does not intend
+to change the width of @var{window}.  Otherwise, the caller should
+specify here the maximum width @var{window}'s body may assume.  Text
+whose x-coordinate is beyond @var{x-limit} is ignored.  Since
+calculating the width of long lines can take some time, it's always a
+good idea to make this argument as small as needed; in particular, if
+the buffer might contain long lines that will be truncated anyway.
+
+The optional argument @var{y-limit}, if non-@code{nil}, specifies the
+maximum pixel-height that can be returned.  Text lines whose
+y-coordinate is beyond @var{y-limit} are ignored.  Since calculating the
+pixel-height of a large buffer can take some time, it makes sense to
+specify this argument; in particular, if the caller does not know the
+size of the buffer.
+
+The optional argument @var{mode-and-header-line} @code{nil} or omitted
+means to not include the height of the mode- or header-line of
+@var{window} in the return value.  If it is either the symbol
+@code{mode-line} or @code{header-line}, include only the height of that
+line, if present, in the return value.  If it is @code{t}, include the
+height of both, if present, in the return value.
+@end defun
+
+
 @node Line Height
 @section Line Height
 @cindex line height
@@ -1881,14 +1951,14 @@ parts of Emacs text.
 lines in a frame, using the @code{line-spacing} frame parameter
 (@pxref{Layout Parameters}).  However, if the default value of
 @code{line-spacing} is non-@code{nil}, it overrides the
-frame's @code{line-spacing} parameter.  An integer value specifies the
-number of pixels put below lines.  A floating point number specifies
+frame's @code{line-spacing} parameter.  An integer specifies the
+number of pixels put below lines.  A floating-point number specifies
 the spacing relative to the frame's default line height.
 
 @vindex line-spacing
   You can specify the line spacing for all lines in a buffer via the
-buffer-local @code{line-spacing} variable.  An integer value specifies
-the number of pixels put below lines.  A floating point number
+buffer-local @code{line-spacing} variable.  An integer specifies
+the number of pixels put below lines.  A floating-point number
 specifies the spacing relative to the default frame line height.  This
 overrides line spacings specified for the frame.
 
@@ -2002,11 +2072,11 @@ Relative character width.  This should be one of the symbols
 The height of the font.  In the simplest case, this is an integer in
 units of 1/10 point.
 
-The value can also be a floating point number or a function, which
+The value can also be floating point or a function, which
 specifies the height relative to an @dfn{underlying face}
-(@pxref{Displaying Faces}).  If the value is a floating point number,
-that specifies the amount by which to scale the height of the
-underlying face.  If the value is a function, that function is called
+(@pxref{Displaying Faces}).  A floating-point value
+specifies the amount by which to scale the height of the
+underlying face.  A function value is called
 with one argument, the height of the underlying face, and returns the
 height of the new face.  If the function is passed an integer
 argument, it must return an integer.
@@ -2040,7 +2110,7 @@ stipple patterns.
 Alternative foreground color, a string.  This is like @code{:foreground}
 but the color is only used as a foreground when the background color is
 near to the foreground that would have been used.  This is useful for
-example when marking text (i.e. the region face).  If the text has a foreground 
+example when marking text (i.e. the region face).  If the text has a foreground
 that is visible with the region face, that foreground is used.
 If the foreground is near the region face background,
 @code{:distant-foreground} is used instead so the text is readable.
@@ -2160,6 +2230,7 @@ font matching those wildcards.  Specifying this attribute also changes
 the values of the @code{:family}, @code{:foundry}, @code{:width},
 @code{:height}, @code{:weight}, and @code{:slant} attributes.
 
+@cindex inheritance, for faces
 @item :inherit
 The name of a face from which to inherit attributes, or a list of face
 names.  Attributes from inherited faces are merged into the face like
@@ -2193,6 +2264,7 @@ suitable for use with @code{:stipple} (see above).  It returns
 
 @node Defining Faces
 @subsection Defining Faces
+@cindex defining faces
 
 @cindex face spec
   The usual way to define a face is through the @code{defface} macro.
@@ -2349,20 +2421,25 @@ This function applies @var{spec} as a face spec for @code{face}.
 @var{spec} should be a face spec, as described in the above
 documentation for @code{defface}.
 
+This function also defines @var{face} as a valid face name if it is
+not already one, and (re)calculates its attributes on existing frames.
+
 @cindex override spec @r{(for a face)}
 The argument @var{spec-type} determines which spec to set.  If it is
 @code{nil} or @code{face-override-spec}, this function sets the
 @dfn{override spec}, which overrides over all other face specs on
-@var{face}.  If it is @code{face-defface-spec}, this function sets the
-default face spec (the same one set by @code{defface}).  If it is
-@code{reset}, this function clears out all customization specs and
-override specs from @var{face} (in this case, the value of @var{spec}
-is ignored).  Any other value of @var{spec-type} is reserved for
-internal use.
+@var{face}.  If it is @code{customized-face} or @code{saved-face},
+this function sets the customized spec or the saved custom spec.  If
+it is @code{face-defface-spec}, this function sets the default face
+spec (the same one set by @code{defface}).  If it is @code{reset},
+this function clears out all customization specs and override specs
+from @var{face} (in this case, the value of @var{spec} is ignored).
+Any other value of @var{spec-type} is reserved for internal use.
 @end defun
 
 @node Attribute Functions
 @subsection Face Attribute Functions
+@cindex face attributes, access and modification
 
   This section describes functions for directly accessing and
 modifying the attributes of a named face.
@@ -2564,6 +2641,8 @@ a non-@code{nil} @code{:inverse-video} attribute.
 
 @node Displaying Faces
 @subsection Displaying Faces
+@cindex displaying faces
+@cindex face merging
 
   When Emacs displays a given piece of text, the visual appearance of
 the text may be determined by faces drawn from different sources.  If
@@ -2619,6 +2698,7 @@ at the next level of face merging.
 
 @node Face Remapping
 @subsection Face Remapping
+@cindex face remapping
 
   The variable @code{face-remapping-alist} is used for buffer-local or
 global changes in the appearance of a face.  For instance, it is used
@@ -2686,7 +2766,7 @@ and @code{face-remap-reset-base} functions; it is intended for major
 modes to remap faces in the buffers they control.
 
 @defun face-remap-add-relative face &rest specs
-This functions adds the face spec in @var{specs} as relative
+This function adds the face spec in @var{specs} as relative
 remappings for face @var{face} in the current buffer.  The remaining
 arguments, @var{specs}, should form either a list of face names, or a
 property list of attribute/value pairs.
@@ -2816,6 +2896,7 @@ usually assign faces to around 400 to 600 characters at each call.
 
 @node Basic Faces
 @subsection Basic Faces
+@cindex basic faces
 
 If your Emacs Lisp program needs to assign some faces to text, it is
 often a good idea to use certain existing faces or inherit from them,
@@ -2958,11 +3039,11 @@ scalable font is enabled for use if its name matches any regular
 expression in the list.  For example,
 
 @example
-(setq scalable-fonts-allowed '("muleindian-2$"))
+(setq scalable-fonts-allowed '("iso10646-1$"))
 @end example
 
 @noindent
-allows the use of scalable fonts with registry @code{muleindian-2}.
+allows the use of scalable fonts with registry @code{iso10646-1}.
 @end defopt
 
 @defvar face-font-rescale-alist
@@ -2982,6 +3063,8 @@ nominal heights and widths would suggest.
 
 @node Font Lookup
 @subsection Looking Up Fonts
+@cindex font lookup
+@cindex looking up fonts
 
 @defun x-list-fonts name &optional reference-face frame maximum width
 This function returns a list of available font names that match
@@ -3039,6 +3122,7 @@ encoding of the font.
 
 @node Fontsets
 @subsection Fontsets
+@cindex fontset
 
   A @dfn{fontset} is a list of fonts, each assigned to a range of
 character codes.  An individual font cannot display the whole range of
@@ -3247,7 +3331,7 @@ These have the same meanings as the face attributes of the same name.
 
 @item :size
 The font size---either a non-negative integer that specifies the pixel
-size, or a floating point number that specifies the point size.
+size, or a floating-point number that specifies the point size.
 
 @item :adstyle
 Additional typographic style information for the font, such as
@@ -3585,8 +3669,8 @@ See the next subsection for details.
 @xref{Fringe Bitmaps}.
 @end ifnottex
 
-@c FIXME: I can't find the ‘fringes-indicator-alist’ variable.  Maybe
-@c it should be ‘fringe-indicator-alist’ or ‘fringe-cursor-alist’?  --xfq
+@c FIXME: I can't find the fringes-indicator-alist variable.  Maybe
+@c it should be fringe-indicator-alist or fringe-cursor-alist?  --xfq
 When @code{fringe-cursor-alist} has a buffer-local value, and there is
 no bitmap defined for a cursor type, the corresponding value from the
 default value of @code{fringes-indicator-alist} is used.
@@ -3839,6 +3923,12 @@ bar actually occupies.
 @var{horizontal-type} is not actually meaningful.
 @end defun
 
+@defun window-scroll-bar-width &optional window
+This function returns the width in pixels of @var{window}'s vertical
+scrollbar.  @var{window} must be a live window, and defaults to the
+selected window.
+@end defun
+
 If you don't specify these values for a window with
 @code{set-window-scroll-bars}, the buffer-local variables
 @code{scroll-bar-mode} and @code{scroll-bar-width} in the buffer being
@@ -3871,6 +3961,70 @@ buffer's scroll bars, measured in pixels.  A value of @code{nil} means
 to use the value specified by the frame.
 @end defvar
 
+@node Window Dividers
+@section Window Dividers
+@cindex window dividers
+@cindex right dividers
+@cindex bottom dividers
+
+Window dividers are bars drawn between a frame's windows.  A ``right''
+divider is drawn between a window and any adjacent windows on the right.
+Its width (thickness) is specified by the frame parameter
+@code{right-divider-width}.  A ``bottom'' divider is drawn between a
+window and adjacent windows on the bottom or the echo area.  Its width
+is specified by the frame parameter @code{bottom-divider-width}.  In
+either case, specifying a width of zero means to not draw such dividers.
+@xref{Layout Parameters}.
+
+   Technically, a right divider ``belongs'' to the window on its left,
+which means that its width contributes to the total width of that
+window.  A bottom divider ``belongs'' to the window above it, which
+means that its width contributes to the total height of that window.
+@xref{Window Sizes}.  When a window has both, a right and a bottom
+divider, the bottom divider ``prevails''.  This means that a bottom
+divider is drawn over the full total width of its window while the right
+divider ends above the bottom divider.
+
+   Dividers can be dragged with the mouse and are therefore useful for
+adjusting the sizes of adjacent windows with the mouse.  They also serve
+to visually set apart adjacent windows when no scroll bars or mode lines
+are present.  The following three faces allow to customize the
+appearance of dividers:
+
+@table @code
+@item window-divider
+When a divider is less than three pixels wide, it is drawn solidly with
+the foreground of this face.  For larger dividers this face is used for
+the inner part only, excluding the first and last pixel.
+
+@item window-divider-first-pixel
+This is the face used for drawing the first pixel of a divider that is
+at least three pixels wide.  To obtain a solid appearance, set this to
+the same value used for the @code{window-divider} face.
+
+@item window-divider-last-pixel
+This is the face used for drawing the last pixel of a divider that is at
+least three pixels wide.  To obtain a solid appearance, set this to the
+same value used for the @code{window-divider} face.
+@end table
+
+You can get the sizes of the dividers of a specific window with the
+following two functions.
+
+@defun window-right-divider-width &optional window
+Return the width (thickness) in pixels of @var{window}'s right divider.
+@var{window} must be a live window and defaults to the selected one.
+The return value is always zero for a rightmost window.
+@end defun
+
+@defun window-bottom-divider-width &optional window
+Return the width (thickness) in pixels of @var{window}'s bottom divider.
+@var{window} must be a live window and defaults to the selected one.
+The return value is zero for the minibuffer window or a bottommost
+window on a minibuffer-less frame.
+@end defun
+
+
 @node Display Property
 @section The @code{display} Property
 @cindex display specification
@@ -3902,6 +4056,7 @@ display specifications and what they mean.
 
 @node Replacing Specs
 @subsection Display Specs That Replace The Text
+@cindex replacing display specs
 
   Some kinds of display specifications specify something to display
 instead of the text that has the property.  These are called
@@ -3961,7 +4116,7 @@ can use in @var{props} to specify the weight of the space:
 
 @table @code
 @item :width @var{width}
-If @var{width} is an integer or floating point number, it specifies
+If @var{width} is a number, it specifies
 that the space width should be @var{width} times the normal character
 width.  @var{width} can also be a @dfn{pixel width} specification
 (@pxref{Pixel Specification}).
@@ -3985,7 +4140,7 @@ also specify the height of the space, with these properties:
 @table @code
 @item :height @var{height}
 Specifies the height of the space.
-If @var{height} is an integer or floating point number, it specifies
+If @var{height} is a number, it specifies
 that the space height should be @var{height} times the normal character
 height.  The @var{height} may also be a @dfn{pixel height} specification
 (@pxref{Pixel Specification}).
@@ -4108,7 +4263,7 @@ This specification together with @code{image} specifies a @dfn{slice}
 (a partial area) of the image to display.  The elements @var{y} and
 @var{x} specify the top left corner of the slice, within the image;
 @var{width} and @var{height} specify the width and height of the
-slice.  Integer values are numbers of pixels.  A floating point number
+slice.  Integers are numbers of pixels.  A floating-point number
 in the range 0.0--1.0 stands for that fraction of the width or height
 of the entire image.
 
@@ -4348,7 +4503,7 @@ functions to insert images into buffers.
 
   Each image descriptor has the form @code{(image . @var{props})},
 where @var{props} is a property list of alternating keyword symbols
-and values, including at least the pair @code{:type @var{TYPE}} which
+and values, including at least the pair @code{:type @var{type}} that
 specifies the image type.
 
   The following is a list of properties that are meaningful for all
@@ -4683,6 +4838,16 @@ should never be rendered using ImageMagick, regardless of the value of
 ImageMagick entirely.
 @end defopt
 
+@defvar image-format-suffixes
+This variable is an alist mapping image types to file name extensions.
+Emacs uses this in conjunction with the @code{:format} image property
+(see below) to give a hint to the ImageMagick library as to the type
+of an image.  Each element has the form @code{(@var{type}
+@var{extension})}, where @var{type} is a symbol specifying an image
+content-type, and @var{extension} is a string that specifies the
+associated file name extension.
+@end defvar
+
   Images loaded with ImageMagick support the following additional
 image descriptor properties:
 
@@ -4693,13 +4858,13 @@ color, which is used as the image's background color if the image
 supports transparency.  If the value is @code{nil}, it defaults to the
 frame's background color.
 
-@item :width, :height
+@item :width @var{width}, :height @var{height}
 The @code{:width} and @code{:height} keywords are used for scaling the
 image.  If only one of them is specified, the other one will be
 calculated so as to preserve the aspect ratio.  If both are specified,
 aspect ratio may not be preserved.
 
-@item :max-width, :max-height
+@item :max-width @var{max-width}, :max-height @var{max-height}
 The @code{:max-width} and @code{:max-height} keywords are used for
 scaling if the size of the image of the image exceeds these values.
 If @code{:width} is set it will have precedence over @code{max-width},
@@ -4708,19 +4873,16 @@ and if @code{:height} is set it will have precedence over
 wish.  @code{:max-width} and @code{:max-height} will always preserve
 the aspect ratio.
 
-@c FIXME: ‘:format-type’ or ‘:format’?  --xfq
-@item :format
-ImageMagick tries to auto-detect the image type, but it isn't always
-able to.  By using @code{:format-type}, we can give ImageMagick a hint
-to try to help it.  It's used in conjunction with the
-@code{image-format-suffixes} variable, which provides a mapping from
-content types to file name suffixes.  This is then given to
-ImageMagick as a file name hint.
+@item :format @var{type}
+The value, @var{type}, should be a symbol specifying the type of the
+image data, as found in @code{image-format-suffixes}.  This is used
+when the image does not have an associated file name, to provide a
+hint to ImageMagick to help it detect the image type.
 
-@item :rotation
+@item :rotation @var{angle}
 Specifies a rotation angle in degrees.
 
-@item :index
+@item :index @var{frame}
 @c Doesn't work: http://debbugs.gnu.org/7978
 @xref{Multi-Frame Images}.
 @end table
@@ -4771,6 +4933,7 @@ Supports the @code{:index} property.  @xref{Multi-Frame Images}.
 
 @node Defining Images
 @subsection Defining Images
+@cindex define image
 
   The functions @code{create-image}, @code{defimage} and
 @code{find-image} provide convenient ways to create image descriptors.
@@ -4789,7 +4952,7 @@ from the file's name.
 The remaining arguments, @var{props}, specify additional image
 properties---for example,
 
-@c ‘:heuristic-mask’ is not documented?
+@c ':heuristic-mask' is not documented?
 @example
 (create-image "foo.xpm" 'xpm nil :heuristic-mask t)
 @end example
@@ -4833,7 +4996,7 @@ of a list of image specifications @var{specs}.
 Each specification in @var{specs} is a property list with contents
 depending on image type.  All specifications must at least contain the
 properties @code{:type @var{type}} and either @w{@code{:file @var{file}}}
-or @w{@code{:data @var{DATA}}}, where @var{type} is a symbol specifying
+or @w{@code{:data @var{data}}}, where @var{type} is a symbol specifying
 the image type, e.g., @code{xbm}, @var{file} is the file to load the
 image from, and @var{data} is a string containing the actual image data.
 The first specification in the list whose @var{type} is supported, and
@@ -4898,6 +5061,7 @@ Here is an example of using @code{image-load-path-for-library}:
 
 @node Showing Images
 @subsection Showing Images
+@cindex show image
 
   You can use an image descriptor by setting up the @code{display}
 property yourself, but it is easier to use the functions in this
@@ -4922,7 +5086,7 @@ The argument @var{slice} specifies a slice of the image to insert.  If
 Otherwise, @var{slice} is a list @code{(@var{x} @var{y} @var{width}
 @var{height})} which specifies the @var{x} and @var{y} positions and
 @var{width} and @var{height} of the image area to insert.  Integer
-values are in units of pixels.  A floating point number in the range
+values are in units of pixels.  A floating-point number in the range
 0.0--1.0 stands for that fraction of the width or height of the entire
 image.
 
@@ -4993,8 +5157,8 @@ will load.  Emacs will refuse to load (and display) any image that is
 larger than this limit.
 
 If the value is an integer, it directly specifies the maximum
-image height and width, measured in pixels.  If it is floating
-point number, it specifies the maximum image height and width
+image height and width, measured in pixels.  If it is floating
+point, it specifies the maximum image height and width
 as a ratio to the frame height and width.  If the value is
 non-numeric, there is no explicit limit on the size of images.
 
@@ -5813,25 +5977,26 @@ parenthesis before giving up.
 @end defopt
 
 @defopt blink-matching-delay
-This variable specifies the number of seconds for the cursor to remain
-at the matching parenthesis.  A fraction of a second often gives
-good results, but the default is 1, which works on all systems.
+This variable specifies the number of seconds to keep indicating the
+matching parenthesis.  A fraction of a second often gives good
+results, but the default is 1, which works on all systems.
 @end defopt
 
 @deffn Command blink-matching-open
 This function is the default value of @code{blink-paren-function}.  It
-assumes that point follows a character with close parenthesis syntax and
-moves the cursor momentarily to the matching opening character.  If that
-character is not already on the screen, it displays the character's
-context in the echo area.  To avoid long delays, this function does not
-search farther than @code{blink-matching-paren-distance} characters.
+assumes that point follows a character with close parenthesis syntax
+and applies the appropriate effect momentarily to the matching opening
+character.  If that character is not already on the screen, it
+displays the character's context in the echo area.  To avoid long
+delays, this function does not search farther than
+@code{blink-matching-paren-distance} characters.
 
 Here is an example of calling this function explicitly.
 
 @smallexample
 @group
 (defun interactive-blink-matching-open ()
-  "Indicate momentarily the start of sexp before point."
+  "Indicate momentarily the start of parenthesized sexp before point."
   (interactive)
 @end group
 @group
@@ -6356,18 +6521,6 @@ indicator of Emacs capabilities on a given display type.  Instead, use
 @code{display-graphic-p} or any of the other @code{display-*-p}
 predicates described in @ref{Display Feature Testing}.
 
-@defvar window-setup-hook
-This variable is a normal hook which Emacs runs after handling the
-initialization files.  Emacs runs this hook after it has completed
-loading your init file, the default initialization file (if
-any), and the terminal-specific Lisp code, and running the hook
-@code{term-setup-hook}.
-
-This hook is used for internal purposes: setting up communication with
-the window system, and creating the initial window.  Users should not
-interfere with it.
-@end defvar
-
 @node Bidirectional Display
 @section Bidirectional Display
 @cindex bidirectional display
@@ -6400,8 +6553,10 @@ positions do not increase monotonically with string or buffer
 position.  In performing this @dfn{bidirectional reordering}, Emacs
 follows the Unicode Bidirectional Algorithm (a.k.a.@: @acronym{UBA}),
 which is described in Annex #9 of the Unicode standard
-(@url{http://www.unicode.org/reports/tr9/}).  Emacs provides a ``Full
-Bidirectionality'' class implementation of the @acronym{UBA}.
+(@url{http://www.unicode.org/reports/tr9/}).  Emacs currently provides
+a ``Non-isolate Bidirectionality'' class implementation of the
+@acronym{UBA}: it does not yet support the isolate directional
+formatting characters introduced with Unicode Standard v6.3.0.
 
 @defvar bidi-display-reordering
 If the value of this buffer-local variable is non-@code{nil} (the
@@ -6441,7 +6596,6 @@ or overlay string includes non-@sc{ascii} characters, these characters
 are assumed to have left-to-right direction.
 
 @cindex display properties, and bidi reordering of text
-@cindex Object Replacement Character
   Text covered by @code{display} text properties, by overlays with
 @code{display} properties whose value is a string, and by any other
 properties that replace buffer text, is treated as a single unit when