diff options
author | Bill Wohler <wohler@newt.com> | 2006-03-15 17:06:16 +0000 |
---|---|---|
committer | Bill Wohler <wohler@newt.com> | 2006-03-15 17:06:16 +0000 |
commit | dcc575318757fb748c9344f248f23f31f098581e (patch) | |
tree | cf84d60064731166a0958eaf3ee211ed4f6c6c4a /lisp/image.el | |
parent | 466b0e5cd7b017ec53a33e43ba9e83df3f7157f9 (diff) | |
download | emacs-dcc575318757fb748c9344f248f23f31f098581e.tar.gz |
(image-load-path-for-library): Fix example by not recommending that
one binds image-load-path. Just defvar it to placate compiler and only
use it if previously defined.
Diffstat (limited to 'lisp/image.el')
-rw-r--r-- | lisp/image.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/image.el b/lisp/image.el index 6938dba05cb..a01497ff445 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -99,11 +99,13 @@ Here is an example that uses a common idiom to provide compatibility with versions of Emacs that lack the variable `image-load-path': - ;; 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))" (unless library (error "No library specified")) (unless image (error "No image specified")) |