Commit 2c676341 authored by Bill Wohler's avatar Bill Wohler
Browse files

(Defining Images): Add image-load-path-for-library.

parent 2d14c9bf
2006-03-11 Bill Wohler <>
* display.texi (Defining Images): Add image-load-path-for-library.
2006-03-11 Luc Teirlinck <>
* text.texi (Adaptive Fill): Fix Texinfo usage.
......@@ -4125,6 +4125,35 @@ should specify the image as follows:
@end example
@end defvar
@defun image-load-path-for-library library image &optional path no-error
Return a suitable search path for images relative to @var{library}.
Images for @var{library} are searched for in @file{../../etc/images}
and @file{../etc/images} relative to the files in
@file{lisp/@var{library}} as well as in @code{image-load-path} and
This function returns the value of @code{load-path} augmented with the
directory containing @var{image}. If @var{path} is given, it is used
instead of @code{load-path}. If @code{path} is @code{t}, just return
the directory that contains @var{image}.
If @var{no-error} is non-nil, this function returns @code{nil} if a
suitable path can't be found rather than signaling an error.
Here is an example that uses a common idiom to provide compatibility
with versions of Emacs that lack the variable @code{image-load-path}:
(let ((load-path
(image-load-path-for-library "mh-e" "mh-logo.xpm"))
(image-load-path-for-library "mh-e" "mh-logo.xpm"
@end example
@end defun
@node Showing Images
@subsection Showing Images
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