Commit f3468eac authored by Glenn Morris's avatar Glenn Morris

(tree-widget-lookup-image): Let-bind `file'.

parent d2c98acc
......@@ -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.
......
......@@ -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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment