diff options
| author | Glenn Morris | 2008-02-23 20:17:44 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-02-23 20:17:44 +0000 |
| commit | f3468eacb72ccf463e5f2ebc082c7deffa5d7bfa (patch) | |
| tree | 5fd6dc28304b71d55b2ada6146805bbc881c3125 /lisp/tree-widget.el | |
| parent | d2c98acc72b8e5cd3c9288a8a26c7ec6c37cedff (diff) | |
| download | emacs-f3468eacb72ccf463e5f2ebc082c7deffa5d7bfa.tar.gz emacs-f3468eacb72ccf463e5f2ebc082c7deffa5d7bfa.zip | |
(tree-widget-lookup-image): Let-bind `file'.
Diffstat (limited to 'lisp/tree-widget.el')
| -rw-r--r-- | lisp/tree-widget.el | 27 |
1 files changed, 14 insertions, 13 deletions
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 | |||
| 403 | function `tree-widget-set-parent-theme'). | 403 | function `tree-widget-set-parent-theme'). |
| 404 | Return the first image found having a supported format, or nil if not | 404 | Return the first image found having a supported format, or nil if not |
| 405 | found." | 405 | found." |
| 406 | (catch 'found | 406 | (let (file) |
| 407 | (dolist (default-directory (tree-widget-themes-path)) | 407 | (catch 'found |
| 408 | (dolist (dir (aref tree-widget--theme 0)) | 408 | (dolist (default-directory (tree-widget-themes-path)) |
| 409 | (dolist (fmt (tree-widget-image-formats)) | 409 | (dolist (dir (aref tree-widget--theme 0)) |
| 410 | (dolist (ext (cdr fmt)) | 410 | (dolist (fmt (tree-widget-image-formats)) |
| 411 | (setq file (expand-file-name (concat name ext) dir)) | 411 | (dolist (ext (cdr fmt)) |
| 412 | (and (file-readable-p file) | 412 | (setq file (expand-file-name (concat name ext) dir)) |
| 413 | (file-regular-p file) | 413 | (and (file-readable-p file) |
| 414 | (throw 'found | 414 | (file-regular-p file) |
| 415 | (tree-widget-create-image | 415 | (throw 'found |
| 416 | (car fmt) file | 416 | (tree-widget-create-image |
| 417 | (tree-widget-image-properties name)))))))) | 417 | (car fmt) file |
| 418 | nil)) | 418 | (tree-widget-image-properties name)))))))) |
| 419 | nil))) | ||
| 419 | 420 | ||
| 420 | (defun tree-widget-find-image (name) | 421 | (defun tree-widget-find-image (name) |
| 421 | "Find the image with NAME in current theme. | 422 | "Find the image with NAME in current theme. |