From: tomo Date: Wed, 24 Mar 2010 16:29:30 +0000 (+0000) Subject: (www-page-display-image): Argument `pivot-mode' accepts string. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=227fb378ce6da03717fd020dd5cbc4fa639aeaba;p=elisp%2Falbum.git (www-page-display-image): Argument `pivot-mode' accepts string. (www-page-batch-get): Use `VGA' as the default value of "size". --- diff --git a/www-page.el b/www-page.el index 2c50727..0b29a41 100644 --- a/www-page.el +++ b/www-page.el @@ -468,6 +468,8 @@ Powered by MnjAlbum WWW-Page Version %s." www-page-version)) )) (defun www-page-display-image (file &optional size image-root pivot-mode) + (if (stringp pivot-mode) + (setq pivot-mode (intern pivot-mode))) (setq file (expand-file-name file image-root)) (when (file-exists-p file) (let (file-dir file-name @@ -484,7 +486,7 @@ Powered by MnjAlbum WWW-Page Version %s." www-page-version)) (setq file-dir (file-name-directory file) file-name (file-name-nondirectory file)) (setq size-opt - (or (when (and pivot-mode + (or (when (and (eq pivot-mode t) (> width height)) (with-temp-buffer (call-process "identify" nil t nil file) @@ -581,7 +583,8 @@ Powered by MnjAlbum WWW-Page Version %s." www-page-version)) (null (file-name-extension target))) 'dir))) ;; (setq file (car (cdr (assoc "file" params)))) - (setq size (car (cdr (assoc "size" params)))) + (setq size (or (car (cdr (assoc "size" params))) + 'VGA)) (setq pivot-mode t) (if (setq ret (cdr (assoc "p" params))) (setq pivot-mode (car ret)))