diff options
author | Glenn Morris <rgm@gnu.org> | 2008-02-23 20:17:44 +0000 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2008-02-23 20:17:44 +0000 |
commit | f3468eacb72ccf463e5f2ebc082c7deffa5d7bfa (patch) | |
tree | 5fd6dc28304b71d55b2ada6146805bbc881c3125 /lisp/tree-widget.el | |
parent | d2c98acc72b8e5cd3c9288a8a26c7ec6c37cedff (diff) | |
download | emacs-f3468eacb72ccf463e5f2ebc082c7deffa5d7bfa.tar.gz |
(tree-widget-lookup-image): Let-bind `file'.
Diffstat (limited to 'lisp/tree-widget.el')
-rw-r--r-- | lisp/tree-widget.el | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/lisp/tree-widget.el b/lisp/tree-widget.el index 371e034ce55..f9845ff861a 100644 --- a/lisp/tree-widget.el +++ b/lisp/tree-widget.el @@ -403,19 +403,20 @@ Search first in current theme, then in parent themes (see also the function `tree-widget-set-parent-theme'). Return the first image found having a supported format, or nil if not found." - (catch 'found - (dolist (default-directory (tree-widget-themes-path)) - (dolist (dir (aref tree-widget--theme 0)) - (dolist (fmt (tree-widget-image-formats)) - (dolist (ext (cdr fmt)) - (setq file (expand-file-name (concat name ext) dir)) - (and (file-readable-p file) - (file-regular-p file) - (throw 'found - (tree-widget-create-image - (car fmt) file - (tree-widget-image-properties name)))))))) - nil)) + (let (file) + (catch 'found + (dolist (default-directory (tree-widget-themes-path)) + (dolist (dir (aref tree-widget--theme 0)) + (dolist (fmt (tree-widget-image-formats)) + (dolist (ext (cdr fmt)) + (setq file (expand-file-name (concat name ext) dir)) + (and (file-readable-p file) + (file-regular-p file) + (throw 'found + (tree-widget-create-image + (car fmt) file + (tree-widget-image-properties name)))))))) + nil))) (defun tree-widget-find-image (name) "Find the image with NAME in current theme. |