(with-mixi-retrieve): Follow the change of mixi.
authorbg66 <bg66>
Tue, 24 Jul 2007 00:36:20 +0000 (00:36 +0000)
committerbg66 <bg66>
Tue, 24 Jul 2007 00:36:20 +0000 (00:36 +0000)
(with-mixi-post-form): Ditto.
(mixi-login-form): New constant.
(with-mixi-retrieve): Use it.
(with-mixi-post-form): Ditto.

ChangeLog
mixi.el

index 2cffac9..173ba3b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-07-24  OHASHI Akira  <bg66@koka-in.org>
+
+       * mixi.el (with-mixi-retrieve): Follow the change of mixi.
+       (with-mixi-post-form): Ditto.
+       (mixi-login-form): New constant.
+       (with-mixi-retrieve): Use it.
+       (with-mixi-post-form): Ditto.
+
 2007-06-20  OHASHI Akira  <bg66@koka-in.org>
 
        * mixi.el (mixi-diary-list-regexp): Follow the change of mixi.
diff --git a/mixi.el b/mixi.el
index 32672e0..afbf116 100644 (file)
--- a/mixi.el
+++ b/mixi.el
@@ -433,14 +433,15 @@ Increase this value when unexpected error frequently occurs."
 (defun mixi-logout ()
   (mixi-retrieve "/logout.pl"))
 
+(defconst mixi-login-form "<form action=\"/login.pl\" method=\"post\">")
+
 (defmacro with-mixi-retrieve (url &rest body)
   `(with-current-buffer (get-buffer-create mixi-temp-buffer-name)
      (when ,url
        (erase-buffer)
        (insert (mixi-retrieve ,url))
        (goto-char (point-min))
-       (when (search-forward
-             "<form action=\"login.pl\" method=\"post\">" nil t)
+       (when (search-forward mixi-login-form nil t)
         (mixi-login)
         (erase-buffer)
         (insert (mixi-retrieve ,url))))
@@ -455,8 +456,7 @@ Increase this value when unexpected error frequently occurs."
        (erase-buffer)
        (insert (mixi-post-form ,url ,fields))
        (goto-char (point-min))
-       (when (search-forward
-             "<form action=\"login.pl\" method=\"post\">" nil t)
+       (when (search-forward mixi-login-form nil t)
         (mixi-login)
         (erase-buffer)
         (insert (mixi-post-form ,url ,fields))))