emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lispref/display.texi


From: Bill Wohler
Subject: [Emacs-diffs] Changes to emacs/lispref/display.texi
Date: Sat, 11 Mar 2006 22:39:36 +0000

Index: emacs/lispref/display.texi
diff -u emacs/lispref/display.texi:1.203 emacs/lispref/display.texi:1.204
--- emacs/lispref/display.texi:1.203    Tue Feb 21 08:42:07 2006
+++ emacs/lispref/display.texi  Sat Mar 11 22:39:35 2006
@@ -4125,6 +4125,35 @@
 @end example
 @end defvar
 
address@hidden 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
address@hidden/@var{library}} as well as in @code{image-load-path} and
address@hidden
+
+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}:
+
address@hidden
+(let ((load-path
+       (image-load-path-for-library "mh-e" "mh-logo.xpm"))
+      (image-load-path
+       (image-load-path-for-library "mh-e" "mh-logo.xpm"
+                                    'image-load-path)))
+  (mh-tool-bar-folder-buttons-init))
address@hidden example
address@hidden defun
+
 @node Showing Images
 @subsection Showing Images
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]