aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2009-04-15 03:07:06 +0000
committerChong Yidong2009-04-15 03:07:06 +0000
commit0c1cfe0109852fa2fc0d955370234bfacdb6bc96 (patch)
tree8ceec18bc2ae6e83aff7a06cab2b0752527eed17
parent524a655d93e4e535ccab96f6650a18f8d1816e03 (diff)
downloademacs-0c1cfe0109852fa2fc0d955370234bfacdb6bc96.tar.gz
emacs-0c1cfe0109852fa2fc0d955370234bfacdb6bc96.zip
* display.texi (Truncation): Overlays can use line-prefix and
wrap-prefix too. (Overlay Properties): Document wrap-prefix and line-prefix. (Face Attributes): Document underline-minimum-offset. (Face Remapping): Copyedits. (Low-Level Font): Copyedits. (Image Cache): Note that the image cache is shared between frames.
-rw-r--r--doc/lispref/ChangeLog10
-rw-r--r--doc/lispref/display.texi113
2 files changed, 75 insertions, 48 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index bac2817b023..073bdc41842 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,13 @@
12009-04-15 Chong Yidong <cyd@stupidchicken.com>
2
3 * display.texi (Truncation): Overlays can use line-prefix and
4 wrap-prefix too.
5 (Overlay Properties): Document wrap-prefix and line-prefix.
6 (Face Attributes): Document underline-minimum-offset.
7 (Face Remapping): Copyedits.
8 (Low-Level Font): Copyedits.
9 (Image Cache): Note that the image cache is shared between frames.
10
12009-04-13 Chong Yidong <cyd@stupidchicken.com> 112009-04-13 Chong Yidong <cyd@stupidchicken.com>
2 12
3 * display.texi (Refresh Screen): Note that a passage about screen 13 * display.texi (Refresh Screen): Note that a passage about screen
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 8fa9a82c6eb..8ef61c31bb5 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -198,26 +198,27 @@ a window, that forces truncation.
198 198
199@defvar wrap-prefix 199@defvar wrap-prefix
200If this buffer-local variable is non-@code{nil}, it defines a 200If this buffer-local variable is non-@code{nil}, it defines a
201``prefix'' that is added at display-time to the beginning of every 201``prefix'' that is prepended to every continuation line at
202continuation line. (If lines are truncated, the wrap-prefix is never 202display-time. (If lines are truncated, the wrap-prefix is never
203used.) It may be a string, an image, or a stretch-glyph, as used by 203used.) It may be a string, an image, or a stretch-glyph; the value is
204the @code{display} text property. @xref{Display Property}. 204interpreted in the same way as a @code{display} text property.
205@xref{Display Property}.
205 206
206A wrap-prefix may also be specified for regions of text, using the 207A wrap-prefix may also be specified for regions of text, using the
207@code{wrap-prefix} text property. This takes precedence over the 208@code{wrap-prefix} text or overlay property. This takes precedence
208value of the @code{wrap-prefix} variable. @xref{Special Properties}. 209over the @code{wrap-prefix} variable. @xref{Special Properties}.
209@end defvar 210@end defvar
210 211
211@defvar line-prefix 212@defvar line-prefix
212If this buffer-local variable is non-@code{nil}, it defines a 213If this buffer-local variable is non-@code{nil}, it defines a
213``prefix'' that is added at display-time to the beginning of every 214``prefix'' that is prepended to every non-continuation line at
214non-continuation line. It may be a string, an image, or a 215display-time. It may be a string, an image, or a stretch-glyph; the
215stretch-glyph, as used by the @code{display} text property. 216value is interpreted in the same way as a @code{display} text
216@xref{Display Property}. 217property. @xref{Display Property}.
217 218
218A line-prefix may also be specified for regions of text using the 219A line-prefix may also be specified for regions of text using the
219@code{line-prefix} text property. This takes precedence over the 220@code{line-prefix} text or overlay property. This takes precedence
220value of the @code{line-prefix} variable. @xref{Special Properties}. 221over the @code{line-prefix} variable. @xref{Special Properties}.
221@end defvar 222@end defvar
222 223
223 If your buffer contains @emph{very} long lines, and you use 224 If your buffer contains @emph{very} long lines, and you use
@@ -1173,7 +1174,7 @@ text property (@pxref{Text Properties}). However, due to a different
1173implementation, overlays generally don't scale well (many operations 1174implementation, overlays generally don't scale well (many operations
1174take a time that is proportional to the number of overlays in the 1175take a time that is proportional to the number of overlays in the
1175buffer). If you need to affect the visual appearance of many portions 1176buffer). If you need to affect the visual appearance of many portions
1176in the buffer, we recommend to use text properties. 1177in the buffer, we recommend using text properties.
1177 1178
1178An overlay uses markers to record its beginning and end; thus, 1179An overlay uses markers to record its beginning and end; thus,
1179editing the text of the buffer adjusts the beginning and end of each 1180editing the text of the buffer adjusts the beginning and end of each
@@ -1538,6 +1539,14 @@ This property's value is a string to add to the display at the end of
1538the overlay. The string does not appear in the buffer in any 1539the overlay. The string does not appear in the buffer in any
1539sense---only on the screen. 1540sense---only on the screen.
1540 1541
1542@item line-prefix
1543This property specifies a display spec to prepend to each
1544non-continuation line at display-time. @xref{Truncation}.
1545
1546@itemx wrap-prefix
1547This property specifies a display spec to prepend to each continuation
1548line at display-time. @xref{Truncation}.
1549
1541@item evaporate 1550@item evaporate
1542@kindex evaporate @r{(overlay property)} 1551@kindex evaporate @r{(overlay property)}
1543If this property is non-@code{nil}, the overlay is deleted automatically 1552If this property is non-@code{nil}, the overlay is deleted automatically
@@ -2151,6 +2160,11 @@ optional argument @var{frame} specifies the frame on which the text is
2151to be displayed; if it is @code{nil}, the selected frame is used. 2160to be displayed; if it is @code{nil}, the selected frame is used.
2152@end defun 2161@end defun
2153 2162
2163@defvar underline-minimum-offset
2164This variable specifies the minimum distance between the baseline and
2165the underline, in pixels, when displaying underlined text.
2166@end defvar
2167
2154@defvar x-bitmap-file-path 2168@defvar x-bitmap-file-path
2155This variable specifies a list of directories for searching 2169This variable specifies a list of directories for searching
2156for bitmap files, for the @code{:stipple} attribute. 2170for bitmap files, for the @code{:stipple} attribute.
@@ -2454,9 +2468,9 @@ face.
2454@item 2468@item
2455If @var{remapping...} recursively references the same face name 2469If @var{remapping...} recursively references the same face name
2456@var{face}, either directly remapping entry, or via the 2470@var{face}, either directly remapping entry, or via the
2457@code{:inherit} attribute of some other face in 2471@code{:inherit} attribute of some other face in @var{remapping...},
2458@var{remapping...}, then that reference uses normal frame-wide 2472then that reference uses the normal definition of @var{face} in the
2459definition of @var{face} instead of the ``remapped'' definition. 2473selected frame, instead of the ``remapped'' definition.
2460 2474
2461For instance, if the @code{mode-line} face is remapped using this 2475For instance, if the @code{mode-line} face is remapped using this
2462entry in @code{face-remapping-alist}: 2476entry in @code{face-remapping-alist}:
@@ -2491,9 +2505,9 @@ have the general form:
2491 (@var{face} @var{relative_specs_1} @var{relative_specs_2} @var{...} @var{base_specs}) 2505 (@var{face} @var{relative_specs_1} @var{relative_specs_2} @var{...} @var{base_specs})
2492@end example 2506@end example
2493 2507
2494Everything except the @var{face} is a ``face spec'', a list of face 2508Everything except @var{face} is a ``face spec'': a list of face names
2495names or face attribute-value pairs. All face specs are merged 2509or face attribute-value pairs. All face specs are merged together,
2496together, with earlier values taking precedence. 2510with earlier values taking precedence.
2497 2511
2498The @var{relative_specs_}n values are ``relative specs'', and are 2512The @var{relative_specs_}n values are ``relative specs'', and are
2499added by @code{face-remap-add-relative} (and removed by 2513added by @code{face-remap-add-relative} (and removed by
@@ -2986,11 +3000,7 @@ should be one of @code{font-object}, @code{font-spec}, or
2986 3000
2987 A font object is a Lisp object that represents a font that Emacs has 3001 A font object is a Lisp object that represents a font that Emacs has
2988@dfn{opened}. Font objects cannot be modified in Lisp, but they can 3002@dfn{opened}. Font objects cannot be modified in Lisp, but they can
2989be inspected. If you call @code{set-face-attribute} and pass a font 3003be inspected.
2990spec, font entity, or font name string as the value of the
2991@code{:font} attribute, Emacs opens the best ``matching'' font that is
2992available for display. It then stores the corresponding font object
2993as the actual value of the @code{:font} attribute for that face.
2994 3004
2995@defun font-at position &optional window string 3005@defun font-at position &optional window string
2996Return the font object that is being used to display the character at 3006Return the font object that is being used to display the character at
@@ -3072,6 +3082,12 @@ entities are sorted in order of decreasing ``closeness'' to that font
3072spec. 3082spec.
3073@end defun 3083@end defun
3074 3084
3085 If you call @code{set-face-attribute} and pass a font spec, font
3086entity, or font name string as the value of the @code{:font}
3087attribute, Emacs opens the best ``matching'' font that is available
3088for display. It then stores the corresponding font object as the
3089actual value of the @code{:font} attribute for that face.
3090
3075 The following functions can be used to obtain information about a 3091 The following functions can be used to obtain information about a
3076font. For these functions, the @var{font} argument can be a font 3092font. For these functions, the @var{font} argument can be a font
3077object, a font entity, or a font spec. 3093object, a font entity, or a font spec.
@@ -4686,40 +4702,41 @@ cache, it can always be displayed, even if the value of
4686@subsection Image Cache 4702@subsection Image Cache
4687@cindex image cache 4703@cindex image cache
4688 4704
4689 Emacs stores images in an image cache so that it can display them 4705 Emacs caches images so that it can display them again more
4690again more efficiently. When Emacs displays an image, it searches the 4706efficiently. When Emacs displays an image, it searches the image
4691image cache for an existing image specification @code{equal} to the 4707cache for an existing image specification @code{equal} to the desired
4692desired specification. If a match is found, the image is displayed 4708specification. If a match is found, the image is displayed from the
4693from the cache; otherwise, Emacs loads the image normally. 4709cache; otherwise, Emacs loads the image normally.
4694 4710
4695 Occasionally, you may need to tell Emacs to refresh the images 4711 Occasionally, you may need to tell Emacs to refresh the images
4696associated with a given image specification. For example, suppose you 4712associated with a given image specification. For example, suppose you
4697display an image using a specification that contains a @code{:file} 4713display an image using a specification that contains a @code{:file}
4698property. The image is loaded from the given file and stored in the 4714property. The image is automatically cached, and subsequent displays
4699image cache. If you later display the image again, using the same 4715of that image, with the same image specification, will use the image
4700image specification, the image is displayed from the image cache. 4716cache. If the image file changes in the meantime, Emacs would be
4701Normally, this is not a problem. However, if the image file has 4717displaying the old version of the image. In such a situation, you can
4702changed in the meantime, Emacs would be displaying the old version of 4718``refresh'' the image by calling @code{image-refresh}.
4703the image. In such a situation, it is necessary to ``refresh'' the 4719
4704image using @code{image-refresh}. 4720 In Emacs' current implementation, each graphical terminal possesses
4721an image cache, which is shared by all the frames on that terminal
4722(@pxref{Multiple Terminals}). Thus, refreshing an image in one frame
4723also refreshes it in all other frames on the same terminal.
4705 4724
4706@defun image-refresh spec &optional frame 4725@defun image-refresh spec &optional frame
4707This function refreshes any images having image specifications 4726This function refreshes any images with image specifications
4708@code{equal} to @var{spec} on frame @var{frame}. If @var{frame} is 4727@code{equal} to @var{spec} on frame @var{frame}. If @var{frame} is
4709@code{nil}, the selected frame is used. If @var{frame} is @code{t}, 4728@code{nil}, it defaults to the selected frame. If @var{frame} is
4710the refresh is applied to all existing frames. 4729@code{t}, the refresh is applied to all existing frames.
4711
4712This works by removing from the image cache all the images whose image
4713specifications match @var{spec}. The next time Emacs needs to display
4714such an image, it will reload the image anew.
4715@end defun 4730@end defun
4716 4731
4717@defun clear-image-cache &optional filter 4732@defun clear-image-cache &optional filter
4718This function clears the image cache. If @var{filter} is 4733This function clears an image cache, removing all the images stored in
4719a frame, only the cache for that frame is cleared. If omitted or 4734it. If @var{filter} is omitted or @code{nil}, it clears the cache for
4720@code{nil}, clear the images on the selected frame. If @code{t}, 4735the selected frame. If @var{filter} is a frame, it clears the cache
4721all frames' caches are cleared. Otherwise, @var{filter} is taken as 4736for that frame. If @var{filter} is @code{t}, all image caches are
4722a file name and only images that reference this file will be flushed. 4737cleared. Otherwise, @var{filter} is taken to be a file name, and all
4738images associated with that file name are removed from all image
4739caches.
4723@end defun 4740@end defun
4724 4741
4725If an image in the image cache has not been displayed for a specified 4742If an image in the image cache has not been displayed for a specified