changeset 69494:a996c2fa0b6a

(Defining Images): Fix example in image-load-path-for-library by not recommending that one binds image-load-path. Just defvar it to placate compiler and only use it if previously defined.
author Bill Wohler <wohler@newt.com>
date Wed, 15 Mar 2006 17:08:39 +0000
parents 4f9233243d97
children a8b5c528ea86
files lispref/ChangeLog lispref/display.texi
diffstat 2 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lispref/ChangeLog	Wed Mar 15 17:06:16 2006 +0000
+++ b/lispref/ChangeLog	Wed Mar 15 17:08:39 2006 +0000
@@ -1,3 +1,10 @@
+2006-03-15  Bill Wohler  <wohler@newt.com>
+
+	* display.texi (Defining Images): Fix example in
+	image-load-path-for-library by not recommending that one binds
+	image-load-path. Just defvar it to placate compiler and only use
+	it if previously defined.
+
 2006-03-14  Bill Wohler  <wohler@newt.com>
 
 	* display.texi (Defining Images): In image-load-path-for-library,
--- a/lispref/display.texi	Wed Mar 15 17:06:16 2006 +0000
+++ b/lispref/display.texi	Wed Mar 15 17:08:39 2006 +0000
@@ -4148,11 +4148,13 @@
 with versions of Emacs that lack the variable @code{image-load-path}:
 
 @example
-;; Avoid errors on Emacsen without `image-load-path'.
-(if (not (boundp 'image-load-path)) (defvar image-load-path nil))
+;; Shush compiler.
+(defvar image-load-path)
 
 (let* ((load-path (image-load-path-for-library "mh-e" "mh-logo.xpm"))
-       (image-load-path (cons (car load-path) image-load-path)))
+       (image-load-path (cons (car load-path)
+                              (when (boundp 'image-load-path)
+                                image-load-path))))
   (mh-tool-bar-folder-buttons-init))
 @end example
 @end defun