aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris2008-02-23 20:17:44 +0000
committerGlenn Morris2008-02-23 20:17:44 +0000
commitf3468eacb72ccf463e5f2ebc082c7deffa5d7bfa (patch)
tree5fd6dc28304b71d55b2ada6146805bbc881c3125 /lisp
parentd2c98acc72b8e5cd3c9288a8a26c7ec6c37cedff (diff)
downloademacs-f3468eacb72ccf463e5f2ebc082c7deffa5d7bfa.tar.gz
emacs-f3468eacb72ccf463e5f2ebc082c7deffa5d7bfa.zip
(tree-widget-lookup-image): Let-bind `file'.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/tree-widget.el27
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 @@
3 * menu-bar.el (menu-bar-games-menu): Add Bubbles and Pong. 3 * menu-bar.el (menu-bar-games-menu): Add Bubbles and Pong.
4 Add :help for Solitaire and Tetris. 4 Add :help for Solitaire and Tetris.
5 5
6 * tree-widget.el (tree-widget-lookup-image): Let-bind `file'.
7
6 * mail/smtpmail.el: Remove leading `*' from defcustom doc-strings. 8 * mail/smtpmail.el: Remove leading `*' from defcustom doc-strings.
7 (smtpmail-code-conv-from): Doc fix. Fix custom type. 9 (smtpmail-code-conv-from): Doc fix. Fix custom type.
8 (smtpmail-queue-index-file): Make it a defcustom. 10 (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
403function `tree-widget-set-parent-theme'). 403function `tree-widget-set-parent-theme').
404Return the first image found having a supported format, or nil if not 404Return the first image found having a supported format, or nil if not
405found." 405found."
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.