(www-page-display-dir): Retrieve image files if `files' or `refs' are
authortomo <tomo>
Tue, 9 Oct 2007 07:05:19 +0000 (07:05 +0000)
committertomo <tomo>
Tue, 9 Oct 2007 07:05:19 +0000 (07:05 +0000)
not defined in dir.desc.
(www-page-display-page): Likewise.

www-page.el

index 1fe9441..02d6a1d 100644 (file)
       (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))
                  (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)))