From 701a61ea41cc45f4b0ff68957d5a82d25f7f4689 Mon Sep 17 00:00:00 2001 From: tomo Date: Tue, 9 Oct 2007 07:05:19 +0000 Subject: [PATCH] (www-page-display-dir): Retrieve image files if `files' or `refs' are not defined in dir.desc. (www-page-display-page): Likewise. --- www-page.el | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/www-page.el b/www-page.el index 1fe9441..02d6a1d 100644 --- a/www-page.el +++ b/www-page.el @@ -94,6 +94,10 @@ (setq source-images (cdr source-images))) (when (setq ref-images (assq 'refs params)) (setq ref-images (cdr ref-images))) + (unless (or source-images ref-images) + (setq source-images + (directory-files (expand-file-name url-dir image-root) + nil "\\.\\(jpg\\|JPG\\)$" nil t))) (when (setq note (assq 'note params)) (setq note (cdr note))) (when (setq parent-url (assq 'exit params)) @@ -239,8 +243,13 @@ (insert-file-contents dir-desc-file) (read (current-buffer))))) (unless (assq 'refs params) - (when (setq rest (assq 'files params)) - (setq rest (cdr rest))) + (if (setq rest (assq 'files params)) + (setq rest (cdr rest)) + (setq rest + (directory-files + (expand-file-name (file-name-directory file) + image-root) + nil "\\.\\(jpg\\|JPG\\)$" nil t))) (setq ret (file-name-nondirectory file)) (while (and rest (not (string= (car rest) ret))) -- 1.7.10.4