]> git.eshelyaron.com Git - emacs.git/commitdiff
(tree-widget-lookup-image): Let-bind `file'.
authorGlenn Morris <rgm@gnu.org>
Sat, 23 Feb 2008 20:17:44 +0000 (20:17 +0000)
committerGlenn Morris <rgm@gnu.org>
Sat, 23 Feb 2008 20:17:44 +0000 (20:17 +0000)
lisp/ChangeLog
lisp/tree-widget.el

index 6d72f54182dcd95c716cf8ec3b0aa44d184dc942..b68496c315d8f3b76fc39a39f1e3bc63b6ffe97a 100644 (file)
@@ -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.
index 371e034ce55c949778ea145aae5aedea8f25ef2f..f9845ff861a2634a56443760d8628d983d043ca5 100644 (file)
@@ -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.