From: tomo Date: Tue, 9 Oct 2007 07:05:19 +0000 (+0000) Subject: (www-page-display-dir): Retrieve image files if `files' or `refs' are X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=701a61ea41cc45f4b0ff68957d5a82d25f7f4689;p=elisp%2Falbum.git (www-page-display-dir): Retrieve image files if `files' or `refs' are not defined in dir.desc. (www-page-display-page): Likewise. --- 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)))