]> code.delx.au - gnu-emacs/blobdiff - lispref/display.texi
*** empty log message ***
[gnu-emacs] / lispref / display.texi
index 95cce29d0c1623134cc454734a594800bc49146b..17e4bc57ea05a750ed6270806ce6768495932333 100644 (file)
@@ -1532,12 +1532,21 @@ or by adding additional vertical space below one or all lines.
 @kindex line-height @r{(text property)}
   A newline can have a @code{line-height} text or overlay property
 that controls the total height of the display line ending in that
-newline.  If the property value is zero, the displayed height of the
+newline.
+
+  If the property value is a list @code{(@var{height} @var{total})},
+then @var{height} is used as the actual property value for the
+@code{line-height}, and @var{total} specifies the total displayed
+height of the line, so the line spacing added below the line equals
+the @var{total} height minus the actual line height.  In this case,
+the other ways to specify the line spacing are ignored.
+
+  If the property value is @code{t}, the displayed height of the
 line is exactly what its contents demand; no line-spacing is added.
 This case is useful for tiling small images or image slices without
 adding blank areas between the images.
 
-  If the property value is not zero, it is a height spec.  A height
+  If the property value is not @code{t}, it is a height spec.  A height
 spec stands for a numeric height value; this heigh spec specifies the
 actual line height, @var{line-height}.  There are several ways to
 write a height spec; here's how each of them translates into a numeric
@@ -1549,14 +1558,17 @@ If the height spec is a positive integer, the height value is that integer.
 @item @var{float}
 If the height spec is a float, @var{float}, the numeric height value
 is @var{float} times the frame's default line height.
-@item (@var{ratio} . @var{face})
+@item (@var{face} . @var{ratio})
 If the height spec is a cons of the format shown, the numeric height
 is @var{ratio} times the height of face @var{face}.  @var{ratio} can
-be any type of number.  If @var{face} is @code{t}, it refers to the
-current face.
+be any type of number, or @code{nil} which means a ratio of 1.
+If @var{face} is @code{t}, it refers to the current face.
+@item (@code{nil} . @var{ratio})
+If the height spec is a cons of the format shown, the numeric height
+is @var{ratio} times the height of the contents of the line.
 @end table
 
-  Thus, any valid nonzero property value specifies a height in pixels,
+  Thus, any valid non-@code{t} property value specifies a height in pixels,
 @var{line-height}, one way or another.  If the line contents' height
 is less than @var{line-height}, Emacs adds extra vertical space above
 the line to achieve the total height @var{line-height}.  Otherwise,
@@ -1595,18 +1607,6 @@ into a Lisp value as described above.  However, in this case the
 numeric height value specifies the line spacing, rather than the line
 height.
 
-  There is one exception, however: if the @var{line-spacing} value is
-a cons @code{(total . @var{spacing})}, then @var{spacing} itself is
-treated as a heigh spec, and specifies the total displayed height of
-the line, so the line spacing equals the specified amount minus the
-line height.  This differs from using the @code{line-height} property
-because it adds space at the bottom of the line instead of the top.
-
-  If you specify both @code{line-spacing} using @code{total} and
-@code{line-height}, they are not redundant.  First @code{line-height}
-goes to work, adding space above the line contents.  Then
-@code{line-spacing} goes to work, adding space below the contents.
-
 @node Faces
 @section Faces
 @cindex faces
@@ -1636,7 +1636,7 @@ face name a special meaning in one frame if you wish.
 * Defining Faces::      How to define a face with @code{defface}.
 * Face Attributes::     What is in a face?
 * Attribute Functions::  Functions to examine and set face attributes.
-* Merging Faces::       How Emacs combines the faces specified for a character.
+* Displaying Faces::     How Emacs combines the faces specified for a character.
 * Font Selection::      Finding the best available font for a face.
 * Face Functions::      How to define and examine faces.
 * Auto Faces::          Hook for automatic face assignment.
@@ -1890,7 +1890,7 @@ as if they had a light background.
 attributes}.  This table lists all the face attributes, and what they
 mean.  Note that in general, more than one face can be specified for a
 given piece of text; when that happens, the attributes of all the faces
-are merged to specify how to display the text.  @xref{Merging Faces}.
+are merged to specify how to display the text.  @xref{Displaying Faces}.
 
   In Emacs 21, any attribute in a face can have the value
 @code{unspecified}.  This means the face doesn't specify that attribute.
@@ -1941,10 +1941,14 @@ On a text-only terminal, slanted text is displayed as half-bright, if
 the terminal supports the feature.
 
 @item :foreground
-Foreground color, a string.
+Foreground color, a string.  The value can be a system-defined color
+name, 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.)
 
 @item :background
-Background color, a string.
+Background color, a string, like the foreground color.
 
 @item :inverse-video
 Whether or not characters should be displayed in inverse video.  The
@@ -2265,8 +2269,8 @@ This function returns the @code{:underline} attribute of face @var{face}.
 This function returns the @code{:inverse-video} attribute of face @var{face}.
 @end defun
 
-@node Merging Faces
-@subsection Merging Faces for Display
+@node Displaying Faces
+@subsection Displaying Faces
 
   Here are the ways to specify which faces to use for display of text:
 
@@ -4045,8 +4049,9 @@ the usual Emacs @code{highlight} face.
 @kindex keymap @r{(button property)}
 The button's keymap, defining bindings active within the button
 region.  By default this is the usual button region keymap, stored
-in the variable @code{button-map}, which defines @key{RET} and
-@key{mouse-2} to invoke the button.
+in the variable @code{button-map}, which defines @key{RET},
+@key{mouse-1} (if @var{mouse-1-click-follows-link} is set),
+and @key{mouse-2} to invoke the button.
 
 @item type
 @kindex type @r{(button property)}
@@ -4059,6 +4064,10 @@ usually specified using the @code{:type} keyword argument.
 A string displayed by the Emacs tool-tip help system; by default,
 @code{"mouse-2, RET: Push this button"}.
 
+@item follow-link
+@kindex follow-link @r{(button property)}
+The follow-link property, defining how a @key{mouse-1} click behaves
+on this button, @xref{Enabling Mouse-1 to Follow Links}.
 @item button
 @kindex button @r{(button property)}
 All buttons have a non-@code{nil} @code{button} property, which may be useful
@@ -4230,7 +4239,8 @@ These are commands and functions for locating and operating on
 buttons in an Emacs buffer.
 
 @code{push-button} is the command that a user uses to actually `push'
-a button, and is bound by default in the button itself to @key{RET}
+a button, and is bound by default in the button itself to @key{RET},
+to @key{mouse-1} (if @var{mouse-1-click-follows-link} is set),
 and to @key{mouse-2} using a region-specific keymap.  Commands
 that are useful outside the buttons itself, such as
 @code{forward-button} and @code{backward-button} are additionally