Mercurial > emacs
changeset 92137:f03174f40e16
(tree-widget-lookup-image): Let-bind `file'.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sat, 23 Feb 2008 20:16:36 +0000 |
parents | d2380a994a27 |
children | 1388227a3680 |
files | lisp/tree-widget.el |
diffstat | 1 files changed, 14 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- 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.