+2006-10-25 Daiki Ueno <ueno@unixuser.org>
+
+ * mixi.el (mixi-retrieve-function): Try to select
+ mixi-retrieve-function automatically.
+
2006-10-25 OHASHI Akira <bg66@koka-in.org>
* mixi.el (mixi-cache-expires): Add new constant.
;;; Code:
-(condition-case nil
- (require 'url)
- (error))
-
-(condition-case nil
- (require 'w3m)
- (error))
-
(eval-when-compile (require 'cl))
(defgroup mixi nil
:group 'mixi)
(defcustom mixi-retrieve-function
- (if (fboundp 'url-retrieve-synchronously)
- 'mixi-w3-retrieve 'mixi-w3m-retrieve)
+ (or (condition-case nil
+ (progn
+ (require 'url)
+ (if (fboundp 'url-retrieve-synchronously)
+ 'mixi-w3-retrieve))
+ (error))
+ (condition-case nil
+ (progn
+ (require 'w3m)
+ 'mixi-w3m-retrieve)
+ (error))
+ (if (and (fboundp 'executable-find)
+ (executable-find mixi-curl-program))
+ 'mixi-curl-retrieve)
+ (error "Can't set `mixi-retrieve-function'"))
"*The function for retrieving."
:type '(radio (const :tag "Using w3" mixi-w3-retrieve)
(const :tag "Using w3m" mixi-w3m-retrieve)