# HG changeset patch # User Glenn Morris # Date 1203797796 0 # Node ID f03174f40e16b7d135ad21b02332ff868d30c19b # Parent d2380a994a272295bc33e635f15519bd1a26238f (tree-widget-lookup-image): Let-bind `file'. diff -r d2380a994a27 -r f03174f40e16 lisp/tree-widget.el --- a/lisp/tree-widget.el Sat Feb 23 20:06:44 2008 +0000 +++ b/lisp/tree-widget.el Sat Feb 23 20:16:36 2008 +0000 @@ -403,19 +403,20 @@ 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.