Return a suitable search path for images used by LIBRARY.
It searches for IMAGE in `image-load-path' (excluding
"`data-directory'/images") and `load-path', followed by a path
suitable for LIBRARY, which includes "../../etc/images" and
"../etc/images" relative to the library file itself, and then
Then this function returns a list of directories which contains
first the directory in which IMAGE was found, followed by the
value of `load-path'. If PATH is given, it is used instead of
If NO-ERROR is non-nil and a suitable path can't be found, don't
signal an error. Instead, return a list of directories as before,
except that nil appears in place of the image directory.
Here is an example that uses a common idiom to provide
compatibility with versions of Emacs that lack the variable
;; Shush compiler.
(let* ((load-path (image-load-path-for-library "mh-e" "mh-logo.xpm"))
(image-load-path (cons (car load-path)
(when (boundp 'image-load-path) image-load-path)))) (mh-tool-bar-folder-buttons-init))