aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Wohler2006-03-14 19:35:08 +0000
committerBill Wohler2006-03-14 19:35:08 +0000
commit70949f309abf3fd2f7c27a253d3ee5d1bf30d83b (patch)
tree0942ab6fb9f1ada300ef7904ef0fc15c79170987
parent44e3f44013ee5d526d2666e2ec8ed4962f9a6c77 (diff)
downloademacs-70949f309abf3fd2f7c27a253d3ee5d1bf30d83b.tar.gz
emacs-70949f309abf3fd2f7c27a253d3ee5d1bf30d83b.zip
(Defining Images): In image-load-path-for-library, always return list
of directories. Update example.
-rw-r--r--lispref/ChangeLog5
-rw-r--r--lispref/display.texi19
2 files changed, 14 insertions, 10 deletions
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index 5b5a316c95e..9d07a2d59c8 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,8 @@
12006-03-14 Bill Wohler <wohler@newt.com>
2
3 * display.texi (Defining Images): In image-load-path-for-library,
4 always return list of directories. Update example.
5
12006-03-14 Alan Mackenzie <acm@muc.de> 62006-03-14 Alan Mackenzie <acm@muc.de>
2 7
3 * modes.texi: New node, "Region to Fontify" (for Font Lock). 8 * modes.texi: New node, "Region to Fontify" (for Font Lock).
diff --git a/lispref/display.texi b/lispref/display.texi
index dcf54f60d1d..294a6d64e7e 100644
--- a/lispref/display.texi
+++ b/lispref/display.texi
@@ -4138,22 +4138,21 @@ First it searches for @var{image} in a path suitable for
4138Then this function returns a list of directories which contains first 4138Then this function returns a list of directories which contains first
4139the directory in which @var{image} was found, followed by the value of 4139the directory in which @var{image} was found, followed by the value of
4140@code{load-path}. If @var{path} is given, it is used instead of 4140@code{load-path}. If @var{path} is given, it is used instead of
4141@code{load-path}. If @var{path} is @code{t}, then the function just 4141@code{load-path}.
4142returns the directory that contains @var{image}.
4143@c ??? Meaningm it does not return a list?
4144 4142
4145If @var{no-error} is non-@code{nil}, this function returns @code{nil} 4143If @var{no-error} is non-@code{nil} and a suitable path can't be
4146if a suitable path can't be found, rather than signaling an error. 4144found, don't signal an error. Instead, return a list of directories as
4145before, except that @code{nil} appears in place of the image directory.
4147 4146
4148Here is an example that uses a common idiom to provide compatibility 4147Here is an example that uses a common idiom to provide compatibility
4149with versions of Emacs that lack the variable @code{image-load-path}: 4148with versions of Emacs that lack the variable @code{image-load-path}:
4150 4149
4151@example 4150@example
4152(let ((load-path 4151;; Avoid errors on Emacsen without `image-load-path'.
4153 (image-load-path-for-library "mh-e" "mh-logo.xpm")) 4152(if (not (boundp 'image-load-path)) (defvar image-load-path nil))
4154 (image-load-path 4153
4155 (image-load-path-for-library "mh-e" "mh-logo.xpm" 4154(let* ((load-path (image-load-path-for-library "mh-e" "mh-logo.xpm"))
4156 'image-load-path))) 4155 (image-load-path (cons (car load-path) image-load-path)))
4157 (mh-tool-bar-folder-buttons-init)) 4156 (mh-tool-bar-folder-buttons-init))
4158@end example 4157@end example
4159@end defun 4158@end defun