* mixi.el (mixi-expand-url): New macro.
authorbg66 <bg66>
Mon, 6 Nov 2006 01:52:30 +0000 (01:52 +0000)
committerbg66 <bg66>
Mon, 6 Nov 2006 01:52:30 +0000 (01:52 +0000)
(mixi-w3-retrieve): Use it.
(mixi-w3m-retrieve): Ditto.
(mixi-curl-retrieve): Ditto.

ChangeLog
mixi.el

index ad9c127..9bb9638 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-11-06  OHASHI Akira  <bg66@koka-in.org>
+
+       * mixi.el (mixi-expand-url): New macro.
+       (mixi-w3-retrieve): Use it.
+       (mixi-w3m-retrieve): Ditto.
+       (mixi-curl-retrieve): Ditto.
+
 2006-11-01  OHASHI Akira  <bg66@koka-in.org>
 
        * mixi.el (mixi-diary-comment-list-regexp): Fix regexp.
diff --git a/mixi.el b/mixi.el
index 977e865..15314c6 100644 (file)
--- a/mixi.el
+++ b/mixi.el
@@ -221,6 +221,9 @@ Increase this value when unexpected error frequently occurs."
     (sit-for mixi-continuously-access-interval)
     (funcall mixi-retrieve-function url post-data)))
 
+(defmacro mixi-expand-url (url)
+  `(concat mixi-url ,url))
+
 (defun mixi-w3-retrieve (url &optional post-data)
   "Retrieve the URL and return gotten strings."
   (if post-data
@@ -229,7 +232,7 @@ Increase this value when unexpected error frequently occurs."
        (setq url-request-data post-data))
     (setq url-request-method "GET")
     (setq url-request-data nil))
-  (let* ((url (url-expand-file-name url mixi-url))
+  (let* ((url (mixi-expand-url url))
         (buffer (url-retrieve-synchronously url))
         ret)
     (unless (bufferp buffer)
@@ -253,7 +256,7 @@ Increase this value when unexpected error frequently occurs."
 
 (defun mixi-w3m-retrieve (url &optional post-data)
   "Retrieve the URL and return gotten strings."
-  (let ((url (w3m-expand-url url mixi-url)))
+  (let ((url (mixi-expand-url url)))
     (with-temp-buffer
       (if (not (string= (w3m-retrieve url nil nil post-data) "text/html"))
          (error (mixi-message "Cannot retrieve"))
@@ -280,7 +283,7 @@ Increase this value when unexpected error frequently occurs."
                                 (list "-i" "-L" "-s"
                                       "-b" mixi-curl-cookie-file
                                       "-c" mixi-curl-cookie-file
-                                      (concat mixi-url url)))))
+                                      (mixi-expand-url url)))))
            (set-process-sentinel process #'ignore))
        (set-default-file-modes orig-mode))
       (when post-data