aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2007-06-14 02:22:13 +0000
committerChong Yidong2007-06-14 02:22:13 +0000
commitbce28eaecd0e1ad1c9018e4d8164b798082680dd (patch)
tree412a74fbdb6af794cb2ab48b145e392bcacaf950
parent650ad62469df4642b67c7dfc2a355019b63fa883 (diff)
downloademacs-bce28eaecd0e1ad1c9018e4d8164b798082680dd.tar.gz
emacs-bce28eaecd0e1ad1c9018e4d8164b798082680dd.zip
(Image Cache): Document image-refresh.
-rw-r--r--lispref/display.texi48
1 files changed, 36 insertions, 12 deletions
diff --git a/lispref/display.texi b/lispref/display.texi
index f644a02c2eb..81da9f8d6e9 100644
--- a/lispref/display.texi
+++ b/lispref/display.texi
@@ -4276,13 +4276,43 @@ cache, it can always be displayed, even if the value of
4276@subsection Image Cache 4276@subsection Image Cache
4277@cindex image cache 4277@cindex image cache
4278 4278
4279 Emacs stores images in an image cache when it displays them, so it can 4279 Emacs stores images in an image cache so that it can display them
4280display them again more efficiently. It removes an image from the cache 4280again more efficiently. When Emacs displays an image, it searches the
4281when it hasn't been displayed for a specified period of time. 4281image cache for an existing image specification @code{equal} to the
4282desired specification. If a match is found, the image is displayed
4283from the cache; otherwise, Emacs loads the image normally.
4284
4285 Occasionally, you may need to tell Emacs to refresh the images
4286associated with a given image specification. For example, suppose you
4287display an image using a specification that contains a @code{:file}
4288property. The image is loaded from the given file and stored in the
4289image cache. If you later display the image again, using the same
4290image specification, the image is displayed from the image cache.
4291Normally, this is not a problem. However, if the image file has
4292changed in the meantime, Emacs would be displaying the old version of
4293the image. In such a situation, it is necessary to ``refresh'' the
4294image using @code{image-refresh}.
4295
4296@defun image-refresh spec &optional frame
4297This function refreshes any images having image specifications
4298@code{equal} to @var{spec} on frame @var{frame}. If @var{frame} is
4299@code{nil}, the selected frame is used. If @var{frame} is @code{t},
4300the refresh is applied to all existing frames.
4301
4302This works by removing all image with image specifications matching
4303@var{spec} from the image cache. Thus, the next time the image is
4304displayed, Emacs will load the image again.
4305@end defun
4306
4307@defun clear-image-cache &optional frame
4308This function clears the entire image cache. If @var{frame} is
4309non-@code{nil}, only the cache for that frame is cleared. Otherwise,
4310all frames' caches are cleared.
4311@end defun
4282 4312
4283When an image is looked up in the cache, its specification is compared 4313If an image in the image cache has not been displayed for a specified
4284with cached image specifications using @code{equal}. This means that 4314period of time, Emacs removes it from the cache and frees the
4285all images with equal specifications share the same image in the cache. 4315associated memory.
4286 4316
4287@defvar image-cache-eviction-delay 4317@defvar image-cache-eviction-delay
4288This variable specifies the number of seconds an image can remain in the 4318This variable specifies the number of seconds an image can remain in the
@@ -4294,12 +4324,6 @@ except when you explicitly clear it. This mode can be useful for
4294debugging. 4324debugging.
4295@end defvar 4325@end defvar
4296 4326
4297@defun clear-image-cache &optional frame
4298This function clears the image cache. If @var{frame} is non-@code{nil},
4299only the cache for that frame is cleared. Otherwise all frames' caches
4300are cleared.
4301@end defun
4302
4303@node Buttons 4327@node Buttons
4304@section Buttons 4328@section Buttons
4305@cindex buttons in buffers 4329@cindex buttons in buffers