aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/image.el
diff options
context:
space:
mode:
authorBill Wohler <[email protected]>2006-03-15 17:06:16 +0000
committerBill Wohler <[email protected]>2006-03-15 17:06:16 +0000
commit9f036d338a998a7a05b971e74d2af8071a518a11 (patch)
treef2500b21122e589de39db6277c13a8e4587ef9ee /lisp/image.el
parentf875b154b4dbaf7901c6bff923581197c1cf8ab5 (diff)
(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.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/image.el b/lisp/image.el
index 6938dba05c..a01497ff44 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"))