From f3468eacb72ccf463e5f2ebc082c7deffa5d7bfa Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 23 Feb 2008 20:17:44 +0000 Subject: [PATCH] (tree-widget-lookup-image): Let-bind `file'. --- lisp/ChangeLog | 2 ++ lisp/tree-widget.el | 27 ++++++++++++++------------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6d72f54182d..b68496c315d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -3,6 +3,8 @@ * menu-bar.el (menu-bar-games-menu): Add Bubbles and Pong. Add :help for Solitaire and Tetris. + * tree-widget.el (tree-widget-lookup-image): Let-bind `file'. + * mail/smtpmail.el: Remove leading `*' from defcustom doc-strings. (smtpmail-code-conv-from): Doc fix. Fix custom type. (smtpmail-queue-index-file): Make it a defcustom. 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. -- 2.39.5