From 874a6ef81bd756b4aaedb946e54f51d525ef36a8 Mon Sep 17 00:00:00 2001 From: Bill Wohler Date: Wed, 15 Mar 2006 17:08:39 +0000 Subject: [PATCH] (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. --- lispref/ChangeLog | 7 +++++++ lispref/display.texi | 8 +++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 9d07a2d59c8..70df1ae03f4 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog @@ -1,3 +1,10 @@ +2006-03-15 Bill Wohler + + * 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 * display.texi (Defining Images): In image-load-path-for-library, diff --git a/lispref/display.texi b/lispref/display.texi index 294a6d64e7e..649d2ca17a0 100644 --- a/lispref/display.texi +++ b/lispref/display.texi @@ -4148,11 +4148,13 @@ Here is an example that uses a common idiom to provide compatibility 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 -- 2.39.2